| SAVE_VALID_OPLINE opline
| mov FCARG1d, opline->op1.var
| EXT_CALL zend_jit_undefined_op_helper, r0
+ zend_jit_check_exception_undef_result(Dst, opline);
if (opline->extended_value & MAY_BE_NULL) {
if (!zend_jit_smart_true(Dst, opline, b, op_array, ssa, (op1_info & (MAY_BE_ANY|MAY_BE_REF)) != 0, smart_branch)) {
return 0;
--- /dev/null
+--TEST--
+JIT TYPE_CHECK: 001 exception handling
+--INI--
+opcache.enable=1
+opcache.enable_cli=1
+opcache.file_update_protection=0
+opcache.jit_buffer_size=1M
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+set_error_handler(function($no, $msg) {
+ throw new Exception($msg);
+});
+
+try {
+ if (!is_scalar($a)) {
+ undefined_function('Null');
+ }
+} catch (Exception $e) {
+ echo "Exception: " . $e->getMessage() . "\n";
+}
+?>
+--EXPECT--
+Exception: Undefined variable: a