3v4l.org

run code in 500+ 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:  14
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        ROPE_INIT                                         3  ~5      'Unknown+property+%22'
          8        ROPE_ADD                                          1  ~5      ~5, !0
          9        ROPE_END                                          2  ~4      ~5, '%22'
         10        SEND_VAL_EX                                                  ~4
         11        DO_FCALL                                          0          
         12      > THROW                                             0          $3
   21    13*     > RETURN                                                       null

End of function __get

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
127.21 ms | 478 KiB | 8 Q