3v4l.org

run code in 300+ PHP versions simultaneously
<?php set_error_handler(function($no, $str, $file, $line) { throw new ErrorException($str, 0, $no, $file, $line); }); set_exception_handler(function(\Exception $e) { echo "Halp! I cant rite teh codez: " . $e->getMessage() . "\n" . $e->getTraceAsString(); }); eval('class A { public function foo() {} } class B extends A { public function foo($bar) {} }');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/toaMF
function name:  (null)
number of ops:  10
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'set_error_handler'
          1        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FtoaMF%3A3%240'
    5     2        SEND_VAL                                                 ~0
          3        DO_ICALL                                                 
    7     4        INIT_FCALL                                               'set_exception_handler'
          5        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FtoaMF%3A7%241'
    9     6        SEND_VAL                                                 ~2
          7        DO_ICALL                                                 
   11     8        INCLUDE_OR_EVAL                                          'class+A+%7B+public+function+foo%28%29+%7B%7D+%7D+class+B+extends+A+%7B+public+function+foo%28%24bar%29+%7B%7D+%7D', EVAL
          9      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FtoaMF%3A3%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/toaMF
function name:  {closure}
number of ops:  13
compiled vars:  !0 = $no, !1 = $str, !2 = $file, !3 = $line
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        RECV                                             !3      
    4     4        NEW                                              $4      'ErrorException'
          5        SEND_VAR_EX                                              !1
          6        SEND_VAL_EX                                              0
          7        SEND_VAR_EX                                              !0
          8        SEND_VAR_EX                                              !2
          9        SEND_VAR_EX                                              !3
         10        DO_FCALL                                      0          
         11      > THROW                                         0          $4
    5    12*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FtoaMF%3A3%240

Function %00%7Bclosure%7D%2Fin%2FtoaMF%3A7%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/toaMF
function name:  {closure}
number of ops:  10
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    8     1        INIT_METHOD_CALL                                         !0, 'getMessage'
          2        DO_FCALL                                      0  $1      
          3        CONCAT                                           ~2      'Halp%21+I+cant+rite+teh+codez%3A+', $1
          4        CONCAT                                           ~3      ~2, '%0A'
          5        INIT_METHOD_CALL                                         !0, 'getTraceAsString'
          6        DO_FCALL                                      0  $4      
          7        CONCAT                                           ~5      ~3, $4
          8        ECHO                                                     ~5
    9     9      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FtoaMF%3A7%241

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.58 ms | 1400 KiB | 17 Q