3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo($v) { if ($v !== 2) { return $v; } throw new Exception('something bad happened'); } $data = array(1, 2, 3); var_dump(array_map('foo', $data));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mriBp
function name:  (null)
number of ops:  9
compiled vars:  !0 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   ASSIGN                                                   !0, <array>
   14     1        INIT_FCALL                                               'var_dump'
          2        INIT_FCALL                                               'array_map'
          3        SEND_VAL                                                 'foo'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $2      
          6        SEND_VAR                                                 $2
          7        DO_ICALL                                                 
          8      > RETURN                                                   1

Function foo:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 4
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/mriBp
function name:  foo
number of ops:  9
compiled vars:  !0 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    5     1        IS_NOT_IDENTICAL                                         !0, 2
          2      > JMPZ                                                     ~1, ->4
    6     3    > > RETURN                                                   !0
    9     4    >   NEW                                              $2      'Exception'
          5        SEND_VAL_EX                                              'something+bad+happened'
          6        DO_FCALL                                      0          
          7      > THROW                                         0          $2
   10     8*     > RETURN                                                   null

End of function foo

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.44 ms | 1395 KiB | 17 Q