3v4l.org

run code in 300+ PHP versions simultaneously
<?php function id($x) { return $x; } class A { function foo() { echo 'a'; } } var_dump(PHP_VERSION_ID); if ((int) PHP_VERSION_ID < 50400) { return id(new A())->foo(); } // return (new A())->foo();
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 14
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/g3FIB
function name:  (null)
number of ops:  15
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   INIT_FCALL                                               'var_dump'
          1        SEND_VAL                                                 80000
          2        DO_ICALL                                                 
   11     3        CAST                                          4  ~1      80000
          4        IS_SMALLER                                               ~1, 50400
          5      > JMPZ                                                     ~2, ->14
   12     6    >   INIT_FCALL                                               'id'
          7        NEW                                              $3      'A'
          8        DO_FCALL                                      0          
          9        SEND_VAR                                                 $3
         10        DO_FCALL                                      0  $5      
         11        INIT_METHOD_CALL                                         $5, 'foo'
         12        DO_FCALL                                      0  $6      
         13      > RETURN                                                   $6
   15    14    > > RETURN                                                   1

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

End of function id

Class A:
Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/g3FIB
function name:  foo
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   ECHO                                                     'a'
          1      > RETURN                                                   null

End of function foo

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.32 ms | 1398 KiB | 16 Q