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; $test->buuu = 'asdsada';
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IWu7N
function name:  (null)
number of ops:  9
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        ASSIGN_OBJ                                               !0, 'buuu'
          7        OP_DATA                                                  'asdsada'
          8      > 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/IWu7N
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/IWu7N
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:
154.75 ms | 1386 KiB | 13 Q