3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo() { if (class_exists('Bar') === false) { class Bar { function foo() {} } } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/c2Cbn
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E > > RETURN                                                   1

Function foo:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 6
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
filename:       /in/c2Cbn
function name:  foo
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL                                               'class_exists'
          1        SEND_VAL                                                 'Bar'
          2        DO_ICALL                                         $0      
          3        TYPE_CHECK                                    4          $0
          4      > JMPZ                                                     ~1, ->6
    5     5    >   DECLARE_CLASS                                            'bar'
    9     6    > > RETURN                                                   null

End of function foo

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

End of function foo

End of class Bar.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
140.25 ms | 1436 KiB | 14 Q