3v4l.org

run code in 300+ PHP versions simultaneously
<?php class a { public $emode = 'Exception'; public function error($text) { throw new $this->emode($text); } } $a = new a; $a->error('test');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JR8NK
function name:  (null)
number of ops:  7
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   NEW                                              $1      'a'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   10     3        INIT_METHOD_CALL                                         !0, 'error'
          4        SEND_VAL_EX                                              'test'
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

Class a:
Function error:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/JR8NK
function name:  error
number of ops:  8
compiled vars:  !0 = $text
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    6     1        FETCH_OBJ_R                                      ~1      'emode'
          2        FETCH_CLASS                                   0  $2      ~1
          3        NEW                                              $3      $2
          4        SEND_VAR_EX                                              !0
          5        DO_FCALL                                      0          
          6      > THROW                                         0          $3
    7     7*     > RETURN                                                   null

End of function error

End of class a.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.53 ms | 1393 KiB | 13 Q