3v4l.org

run code in 300+ PHP versions simultaneously
<?php try { $func = function(Hoge $hoge) { echo '★★func called!★★', PHP_EOL; }; set_error_handler (function ($errno, $errstr, $errfile, $errline) { printf('★★error handler at line(%d) called! errno = %d★★' . PHP_EOL, __LINE__, $errno); echo $errstr, PHP_EOL; return; }); $func(); echo '-----', PHP_EOL; set_error_handler (function ($errno, $errstr, $errfile, $errline) { printf('★★error handler at line(%d) called! errno = %d★★' . PHP_EOL, __LINE__, $errno); echo $errstr, PHP_EOL; return false; }); $func(); } catch (\Error $e) { echo $e->getMessage(); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 17
Branch analysis from position: 17
2 jumps found. (Code = 107) Position 1 = 18, Position 2 = -2
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8svWG
function name:  (null)
number of ops:  22
compiled vars:  !0 = $func, !1 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F8svWG%3A4%240'
          1        ASSIGN                                                   !0, ~2
    8     2        INIT_FCALL                                               'set_error_handler'
          3        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F8svWG%3A8%241'
   12     4        SEND_VAL                                                 ~4
          5        DO_ICALL                                                 
   13     6        INIT_DYNAMIC_CALL                                        !0
          7        DO_FCALL                                      0          
   15     8        ECHO                                                     '-----'
          9        ECHO                                                     '%0A'
   17    10        INIT_FCALL                                               'set_error_handler'
         11        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F8svWG%3A17%242'
   21    12        SEND_VAL                                                 ~7
         13        DO_ICALL                                                 
   22    14        INIT_DYNAMIC_CALL                                        !0
         15        DO_FCALL                                      0          
         16      > JMP                                                      ->21
   24    17  E > > CATCH                                       last         'Error'
   25    18    >   INIT_METHOD_CALL                                         !1, 'getMessage'
         19        DO_FCALL                                      0  $10     
         20        ECHO                                                     $10
   26    21    > > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2F8svWG%3A4%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8svWG
function name:  {closure}
number of ops:  4
compiled vars:  !0 = $hoge
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    5     1        ECHO                                                     '%E2%98%85%E2%98%85func+called%21%E2%98%85%E2%98%85'
          2        ECHO                                                     '%0A'
    6     3      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F8svWG%3A4%240

Function %00%7Bclosure%7D%2Fin%2F8svWG%3A8%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8svWG
function name:  {closure}
number of ops:  13
compiled vars:  !0 = $errno, !1 = $errstr, !2 = $errfile, !3 = $errline
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        RECV                                             !3      
    9     4        INIT_FCALL                                               'printf'
          5        SEND_VAL                                                 '%E2%98%85%E2%98%85error+handler+at+line%28%25d%29+called%21+errno+%3D+%25d%E2%98%85%E2%98%85%0A'
          6        SEND_VAL                                                 9
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                                 
   10     9        ECHO                                                     !1
         10        ECHO                                                     '%0A'
   11    11      > RETURN                                                   null
   12    12*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F8svWG%3A8%241

Function %00%7Bclosure%7D%2Fin%2F8svWG%3A17%242:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8svWG
function name:  {closure}
number of ops:  13
compiled vars:  !0 = $errno, !1 = $errstr, !2 = $errfile, !3 = $errline
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        RECV                                             !3      
   18     4        INIT_FCALL                                               'printf'
          5        SEND_VAL                                                 '%E2%98%85%E2%98%85error+handler+at+line%28%25d%29+called%21+errno+%3D+%25d%E2%98%85%E2%98%85%0A'
          6        SEND_VAL                                                 18
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                                 
   19     9        ECHO                                                     !1
         10        ECHO                                                     '%0A'
   20    11      > RETURN                                                   <false>
   21    12*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F8svWG%3A17%242

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
192.48 ms | 1400 KiB | 17 Q