3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { /** @return A */ public function s() { $this->{'v'} = null; return intval(isset($this->{'v'})); } } $a = new A; echo $a->s(); echo $a->s();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UkEke
function name:  (null)
number of ops:  10
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   NEW                                              $1      'A'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   11     3        INIT_METHOD_CALL                                         !0, 's'
          4        DO_FCALL                                      0  $4      
          5        ECHO                                                     $4
   12     6        INIT_METHOD_CALL                                         !0, 's'
          7        DO_FCALL                                      0  $5      
          8        ECHO                                                     $5
          9      > RETURN                                                   1

Class A:
Function s:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UkEke
function name:  s
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ASSIGN_OBJ                                               'v'
          1        OP_DATA                                                  null
    6     2        ISSET_ISEMPTY_PROP_OBJ                           ~1      'v'
          3        CAST                                          4  ~2      ~1
          4      > RETURN                                                   ~2
    7     5*     > RETURN                                                   null

End of function s

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.25 ms | 1393 KiB | 13 Q