3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo($x) { return $x + 1; } echo (true ? 'foo' : 'foo')(42);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 1, Position 2 = 3
Branch analysis from position: 1
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gXZVj
function name:  (null)
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E > > JMPZ                                                     <true>, ->3
          1    >   QM_ASSIGN                                        ~0      'foo'
          2      > JMP                                                      ->4
          3    >   QM_ASSIGN                                        ~0      'foo'
          4    >   INIT_DYNAMIC_CALL                                        ~0
          5        SEND_VAL_EX                                              42
          6        DO_FCALL                                      0  $1      
          7        ECHO                                                     $1
          8      > RETURN                                                   1

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gXZVj
function name:  foo
number of ops:  4
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        ADD                                              ~1      !0, 1
          2      > RETURN                                                   ~1
    5     3*     > RETURN                                                   null

End of function foo

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
135.66 ms | 996 KiB | 13 Q