3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { private $a; public function __construct(string $a) { $this->a = $a; } public function doStuff() { var_dump(isset($this->a), isset($a)); echo '$this->a holds the value of : ' . $this->a . PHP_EOL; echo '$a holds the value of : ' . $a . PHP_EOL; } } $aObject = new A("helloWorld"); $aObject->doStuff();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ovBDs
function name:  (null)
number of ops:  7
compiled vars:  !0 = $aObject
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   NEW                                              $1      'A'
          1        SEND_VAL_EX                                              'helloWorld'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   22     4        INIT_METHOD_CALL                                         !0, 'doStuff'
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

Class A:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ovBDs
function name:  __construct
number of ops:  4
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    8     1        ASSIGN_OBJ                                               'a'
          2        OP_DATA                                                  !0
    9     3      > RETURN                                                   null

End of function __construct

Function dostuff:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ovBDs
function name:  doStuff
number of ops:  14
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   INIT_FCALL                                               'var_dump'
          1        ISSET_ISEMPTY_PROP_OBJ                           ~1      'a'
          2        SEND_VAL                                                 ~1
          3        ISSET_ISEMPTY_CV                                 ~2      !0
          4        SEND_VAL                                                 ~2
          5        DO_ICALL                                                 
   14     6        FETCH_OBJ_R                                      ~4      'a'
          7        CONCAT                                           ~5      '%24this-%3Ea+holds+the+value+of+%3A+', ~4
          8        CONCAT                                           ~6      ~5, '%0A'
          9        ECHO                                                     ~6
   15    10        CONCAT                                           ~7      '%24a+holds+the+value+of+%3A+', !0
         11        CONCAT                                           ~8      ~7, '%0A'
         12        ECHO                                                     ~8
   16    13      > RETURN                                                   null

End of function dostuff

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.14 ms | 1396 KiB | 15 Q