3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); final class Test { public int $prop; public function __construct() { unset($this->prop); } public function __get(string $property) { if ('prop' === $property) { return $this->prop = 1; } throw new LogicException(sprintf('Unknown property "%s"', $property)); } } $test = new Test(); var_dump($test->prop);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RbFFM
function name:  (null)
number of ops:  8
compiled vars:  !0 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   NEW                                              $1      'Test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   25     3        INIT_FCALL                                               'var_dump'
          4        FETCH_OBJ_R                                      ~4      !0, 'prop'
          5        SEND_VAL                                                 ~4
          6        DO_ICALL                                                 
          7      > RETURN                                                   1

Class Test:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RbFFM
function name:  __construct
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   UNSET_OBJ                                                'prop'
   12     1      > RETURN                                                   null

End of function __construct

Function __get:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 6
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/RbFFM
function name:  __get
number of ops:  15
compiled vars:  !0 = $property
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   RECV                                             !0      
   16     1        IS_IDENTICAL                                             !0, 'prop'
          2      > JMPZ                                                     ~1, ->6
   17     3    >   ASSIGN_OBJ                                       ~2      'prop'
          4        OP_DATA                                                  1
          5      > RETURN                                                   ~2
   20     6    >   NEW                                              $3      'LogicException'
          7        INIT_FCALL                                               'sprintf'
          8        SEND_VAL                                                 'Unknown+property+%22%25s%22'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                         $4      
         11        SEND_VAR_NO_REF_EX                                       $4
         12        DO_FCALL                                      0          
         13      > THROW                                         0          $3
   21    14*     > RETURN                                                   null

End of function __get

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
284.68 ms | 1007 KiB | 15 Q