3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { protected $test1 = false; protected $test2 = true; public function outputTests() { if ($this->test1) { echo "test!"; } if ($this->test2) { echo "test2!"; } } } $a = new A(); $a->outputTests();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qVhPd
function name:  (null)
number of ops:  6
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   NEW                                              $1      'A'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   24     3        INIT_METHOD_CALL                                         !0, 'outputTests'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Class A:
Function outputtests:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 2, Position 2 = 3
Branch analysis from position: 2
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
Branch analysis from position: 3
filename:       /in/qVhPd
function name:  outputTests
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   FETCH_OBJ_R                                      ~0      'test1'
          1      > JMPZ                                                     ~0, ->3
   14     2    >   ECHO                                                     'test%21'
   16     3    >   FETCH_OBJ_R                                      ~1      'test2'
          4      > JMPZ                                                     ~1, ->6
   18     5    >   ECHO                                                     'test2%21'
   20     6    > > RETURN                                                   null

End of function outputtests

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.97 ms | 1398 KiB | 13 Q