3v4l.org

run code in 300+ PHP versions simultaneously
<?php set_error_handler(function () { return false; }); function foo() { try { return "" . new stdclass; } catch (Throwable $t) { return "wat"; } } var_dump(foo());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/k1tXJ
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%2Fk1tXJ%3A3%240'
          2        SEND_VAL                                                 ~0
          3        DO_ICALL                                                 
   13     4        INIT_FCALL                                               'var_dump'
          5        INIT_FCALL                                               'foo'
          6        DO_FCALL                                      0  $2      
          7        SEND_VAR                                                 $2
          8        DO_ICALL                                                 
          9      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2Fk1tXJ%3A3%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/k1tXJ
function name:  {closure}
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E > > RETURN                                                   <false>
          1*     > RETURN                                                   null

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

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 5
Branch analysis from position: 5
2 jumps found. (Code = 107) Position 1 = 6, Position 2 = -2
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/k1tXJ
function name:  foo
number of ops:  8
compiled vars:  !0 = $t
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   NEW                                              $1      'stdclass'
          1        DO_FCALL                                      0          
          2        CONCAT                                           ~3      '', $1
          3      > RETURN                                                   ~3
          4*       JMP                                                      ->7
    8     5  E > > CATCH                                       last         'Throwable'
    9     6    > > RETURN                                                   'wat'
   11     7*     > RETURN                                                   null

End of function foo

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.38 ms | 1399 KiB | 18 Q