3v4l.org

run code in 300+ PHP versions simultaneously
<?php version_compare(PHP_VERSION, '5.0.0', '>=') or die('SKIPPING PHP 4'); class Foo { public $foo; } class FooProxy extends Foo { public function __construct() { unset($this->foo); } public function __set($name, $value) { echo "set$name\n"; } public function __get($name) { echo "get$name\n"; } } $p = new FooProxy(); $p->foo = "bar"; echo $p->foo; $p = new FooProxy(); echo $p->foo; $p->foo = "bar";
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 6, Position 2 = 8
Branch analysis from position: 6
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/37X2h
function name:  (null)
number of ops:  23
compiled vars:  !0 = $p
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    1     0  E >   INIT_FCALL                                               'version_compare'
          1        SEND_VAL                                                 '8.0.0'
          2        SEND_VAL                                                 '5.0.0'
          3        SEND_VAL                                                 '%3E%3D'
          4        DO_ICALL                                         $1      
          5      > JMPNZ_EX                                         ~2      $1, ->8
          6    > > EXIT                                                     'SKIPPING+PHP+4'
          7*       BOOL                                             ~2      <true>
   26     8    >   NEW                                              $3      'FooProxy'
          9        DO_FCALL                                      0          
         10        ASSIGN                                                   !0, $3
   27    11        ASSIGN_OBJ                                               !0, 'foo'
         12        OP_DATA                                                  'bar'
   28    13        FETCH_OBJ_R                                      ~7      !0, 'foo'
         14        ECHO                                                     ~7
   30    15        NEW                                              $8      'FooProxy'
         16        DO_FCALL                                      0          
         17        ASSIGN                                                   !0, $8
   31    18        FETCH_OBJ_R                                      ~11     !0, 'foo'
         19        ECHO                                                     ~11
   32    20        ASSIGN_OBJ                                               !0, 'foo'
         21        OP_DATA                                                  'bar'
         22      > RETURN                                                   1

Class Foo: [no user functions]
Class FooProxy:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/37X2h
function name:  __construct
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   UNSET_OBJ                                                'foo'
   13     1      > RETURN                                                   null

End of function __construct

Function __set:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/37X2h
function name:  __set
number of ops:  7
compiled vars:  !0 = $name, !1 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   17     2        ROPE_INIT                                     3  ~3      'set'
          3        ROPE_ADD                                      1  ~3      ~3, !0
          4        ROPE_END                                      2  ~2      ~3, '%0A'
          5        ECHO                                                     ~2
   18     6      > RETURN                                                   null

End of function __set

Function __get:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/37X2h
function name:  __get
number of ops:  6
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   RECV                                             !0      
   22     1        ROPE_INIT                                     3  ~2      'get'
          2        ROPE_ADD                                      1  ~2      ~2, !0
          3        ROPE_END                                      2  ~1      ~2, '%0A'
          4        ECHO                                                     ~1
   23     5      > RETURN                                                   null

End of function __get

End of class FooProxy.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.37 ms | 1392 KiB | 15 Q