3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { static $one; public function Test($name) { if (!isset($this->one)) $this->one = 0; $this->one++; } } new Test("foo"); new Test("bar");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uaKOa
function name:  (null)
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   NEW                                              $0      'Test'
          1        SEND_VAL_EX                                              'foo'
          2        DO_FCALL                                      0          
          3        FREE                                                     $0
   15     4        NEW                                              $2      'Test'
          5        SEND_VAL_EX                                              'bar'
          6        DO_FCALL                                      0          
          7        FREE                                                     $2
          8      > 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
filename:       /in/uaKOa
function name:  Test
number of ops:  8
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    7     1        ISSET_ISEMPTY_PROP_OBJ                           ~1      'one'
          2        BOOL_NOT                                         ~2      ~1
          3      > JMPZ                                                     ~2, ->6
    8     4    >   ASSIGN_OBJ                                               'one'
          5        OP_DATA                                                  0
   10     6    >   PRE_INC_OBJ                                              'one'
   11     7      > RETURN                                                   null

End of function test

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.79 ms | 1393 KiB | 13 Q