3v4l.org

run code in 300+ PHP versions simultaneously
<?php class AbilityScore { public $value; public function __construct(int $value) { if ($value < 1) throw new AbilityScoreTooLowException('Ability Score should be at least 1'); $this->value = $value; } public function __set($field, $value) { throw new Exception('Not here mate!'); } } $test = new AbilityScore(10); $test->value = 11; var_dump($test); $test->buuu = 'asdsada'; var_dump($test);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NOKO5
function name:  (null)
number of ops:  15
compiled vars:  !0 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   NEW                                              $1      'AbilityScore'
          1        SEND_VAL_EX                                              10
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   20     4        ASSIGN_OBJ                                               !0, 'value'
          5        OP_DATA                                                  11
   21     6        INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                                 
   22     9        ASSIGN_OBJ                                               !0, 'buuu'
         10        OP_DATA                                                  'asdsada'
   23    11        INIT_FCALL                                               'var_dump'
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

Class AbilityScore:
Function __construct:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 7
Branch analysis from position: 3
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NOKO5
function name:  __construct
number of ops:  10
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    8     1        IS_SMALLER                                               !0, 1
          2      > JMPZ                                                     ~1, ->7
    9     3    >   NEW                                              $2      'AbilityScoreTooLowException'
          4        SEND_VAL_EX                                              'Ability+Score+should+be+at+least+1'
          5        DO_FCALL                                      0          
          6      > THROW                                         0          $2
   11     7    >   ASSIGN_OBJ                                               'value'
          8        OP_DATA                                                  !0
   12     9      > RETURN                                                   null

End of function __construct

Function __set:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/NOKO5
function name:  __set
number of ops:  7
compiled vars:  !0 = $field, !1 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   15     2        NEW                                              $2      'Exception'
          3        SEND_VAL_EX                                              'Not+here+mate%21'
          4        DO_FCALL                                      0          
          5      > THROW                                         0          $2
   16     6*     > RETURN                                                   null

End of function __set

End of class AbilityScore.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.06 ms | 1400 KiB | 15 Q