3v4l.org

run code in 300+ PHP versions simultaneously
<?php if (mt_rand(0, 1) === 0) { class Foo { static function bar() { echo 'First bar'; } } } else { class Foo { static function bar() { echo 'Second bar'; } } } Foo::bar();
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 8
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BGUYr
function name:  (null)
number of ops:  12
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'mt_rand'
          1        SEND_VAL                                                 0
          2        SEND_VAL                                                 1
          3        DO_ICALL                                         $0      
          4        IS_IDENTICAL                                             $0, 0
          5      > JMPZ                                                     ~1, ->8
    4     6    >   DECLARE_CLASS                                            'foo'
          7      > JMP                                                      ->9
   10     8    >   DECLARE_CLASS                                            'foo'
   17     9    >   INIT_STATIC_METHOD_CALL                                  'Foo', 'bar'
         10        DO_FCALL                                      0          
         11      > RETURN                                                   1

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

End of function bar

End of class Foo.

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

End of function bar

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.53 ms | 1395 KiB | 15 Q