3v4l.org

run code in 300+ PHP versions simultaneously
<?php class bla { static function bar(){ static $flag = 1; $flag++; if ($flag == 2 ) { echo '\nstring name blee'; return 'blee'; } if ($flag == 3){ echo '\nnew object blee'; return new blee; } } } class blee { static $baz = "\nOh, baz!"; } /**********************************/ $foo = "bla"; echo $foo::bar()::$baz; $foo = new bla; echo $foo::bar()::$baz;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/k2Z08
function name:  (null)
number of ops:  17
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   ASSIGN                                                   !0, 'bla'
   24     1        FETCH_CLASS                                   0  $2      !0
          2        INIT_STATIC_METHOD_CALL                                  $2, 'bar'
          3        DO_FCALL                                      0  $3      
          4        FETCH_CLASS                                   0  $4      $3
          5        FETCH_STATIC_PROP_R          unknown             ~5      'baz'
          6        ECHO                                                     ~5
   26     7        NEW                                              $6      'bla'
          8        DO_FCALL                                      0          
          9        ASSIGN                                                   !0, $6
   27    10        FETCH_CLASS                                   0  $9      !0
         11        INIT_STATIC_METHOD_CALL                                  $9, 'bar'
         12        DO_FCALL                                      0  $10     
         13        FETCH_CLASS                                   0  $11     $10
         14        FETCH_STATIC_PROP_R          unknown             ~12     'baz'
         15        ECHO                                                     ~12
         16      > RETURN                                                   1

Class bla:
Function bar:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 6
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 12
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/k2Z08
function name:  bar
number of ops:  13
compiled vars:  !0 = $flag
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   BIND_STATIC                                              !0
    7     1        PRE_INC                                                  !0
    8     2        IS_EQUAL                                                 !0, 2
          3      > JMPZ                                                     ~2, ->6
    9     4    >   ECHO                                                     '%5Cnstring+name+blee'
   10     5      > RETURN                                                   'blee'
   12     6    >   IS_EQUAL                                                 !0, 3
          7      > JMPZ                                                     ~3, ->12
   13     8    >   ECHO                                                     '%5Cnnew+object+blee'
   14     9        NEW                                              $4      'blee'
         10        DO_FCALL                                      0          
         11      > RETURN                                                   $4
   16    12    > > RETURN                                                   null

End of function bar

End of class bla.

Class blee: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.81 ms | 1395 KiB | 13 Q