3v4l.org

run code in 300+ PHP versions simultaneously
<?php class test { static private $xx = array(); public function test() { if (empty($this::$xx)) { echo "lel"; return; } echo "lul"; } public function tust() { if (empty(self::$xx)) { echo "lel!!"; return; } echo "lul!!"; } } $x = new test(); $x->tust(); $x->test();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PaQAj
function name:  (null)
number of ops:  8
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   28     0  E >   NEW                                              $1      'test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   29     3        INIT_METHOD_CALL                                         !0, 'tust'
          4        DO_FCALL                                      0          
   30     5        INIT_METHOD_CALL                                         !0, 'test'
          6        DO_FCALL                                      0          
          7      > RETURN                                                   1

Class test:
Function test:
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
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PaQAj
function name:  test
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   FETCH_THIS                                       ~0      
          1        FETCH_CLASS                                   0  $1      ~0
          2        ISSET_ISEMPTY_STATIC_PROP                                'xx'
          3      > JMPZ                                                     ~2, ->6
   10     4    >   ECHO                                                     'lel'
   11     5      > RETURN                                                   null
   14     6    >   ECHO                                                     'lul'
   15     7      > RETURN                                                   null

End of function test

Function tust:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 2, Position 2 = 4
Branch analysis from position: 2
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PaQAj
function name:  tust
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   ISSET_ISEMPTY_STATIC_PROP                                'xx'
          1      > JMPZ                                                     ~0, ->4
   20     2    >   ECHO                                                     'lel%21%21'
   21     3      > RETURN                                                   null
   24     4    >   ECHO                                                     'lul%21%21'
   25     5      > RETURN                                                   null

End of function tust

End of class test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.12 ms | 1395 KiB | 13 Q