3v4l.org

run code in 300+ PHP versions simultaneously
<?php class myCustomException extends Exception { } class someClass { public function __call($name, $arguments) { if (!method_exists($this, $name)) { throw new myCustomException($name . ' has shuffled the mortal coil'); } } } $someObject = new someClass(); try { $someObject->someMethodTheObjectDoesntProvide(); } catch (myCustomException $e) { echo $e->getMessage(); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 6
Branch analysis from position: 6
2 jumps found. (Code = 107) Position 1 = 7, Position 2 = -2
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4YGb0
function name:  (null)
number of ops:  11
compiled vars:  !0 = $someObject, !1 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   NEW                                              $2      'someClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   17     3        INIT_METHOD_CALL                                         !0, 'someMethodTheObjectDoesntProvide'
          4        DO_FCALL                                      0          
          5      > JMP                                                      ->10
   18     6  E > > CATCH                                       last         'myCustomException'
   19     7    >   INIT_METHOD_CALL                                         !1, 'getMessage'
          8        DO_FCALL                                      0  $6      
          9        ECHO                                                     $6
   20    10    > > RETURN                                                   1

Class myCustomException: [no user functions]
Class someClass:
Function __call:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 14
Branch analysis from position: 9
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4YGb0
function name:  __call
number of ops:  15
compiled vars:  !0 = $name, !1 = $arguments
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    8     2        INIT_FCALL                                               'method_exists'
          3        FETCH_THIS                                       ~2      
          4        SEND_VAL                                                 ~2
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $3      
          7        BOOL_NOT                                         ~4      $3
          8      > JMPZ                                                     ~4, ->14
    9     9    >   NEW                                              $5      'myCustomException'
         10        CONCAT                                           ~6      !0, '+has+shuffled+the+mortal+coil'
         11        SEND_VAL_EX                                              ~6
         12        DO_FCALL                                      0          
         13      > THROW                                         0          $5
   11    14    > > RETURN                                                   null

End of function __call

End of class someClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
127.1 ms | 1401 KiB | 15 Q