3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { public function __construct($a) { } } new Test(); new Test(1); new Test(1, 2); new Test(1, 2, 3); try { new DateTime(); new DateTime(''); new DateTime('', new DateTimeZone('Europe/London'), ''); } catch (Exception $e) { echo 'Caught exception: ', $e->getMessage(), "\n"; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 41
Branch analysis from position: 41
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 35
Branch analysis from position: 35
2 jumps found. (Code = 107) Position 1 = 36, Position 2 = -2
Branch analysis from position: 36
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kGKva
function name:  (null)
number of ops:  42
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   NEW                                              $1      'Test'
          1        DO_FCALL                                      0          
          2        FREE                                                     $1
    8     3        NEW                                              $3      'Test'
          4        SEND_VAL_EX                                              1
          5        DO_FCALL                                      0          
          6        FREE                                                     $3
    9     7        NEW                                              $5      'Test'
          8        SEND_VAL_EX                                              1
          9        SEND_VAL_EX                                              2
         10        DO_FCALL                                      0          
         11        FREE                                                     $5
   10    12        NEW                                              $7      'Test'
         13        SEND_VAL_EX                                              1
         14        SEND_VAL_EX                                              2
         15        SEND_VAL_EX                                              3
         16        DO_FCALL                                      0          
         17        FREE                                                     $7
   13    18        NEW                                              $9      'DateTime'
         19        DO_FCALL                                      0          
         20        FREE                                                     $9
   14    21        NEW                                              $11     'DateTime'
         22        SEND_VAL_EX                                              ''
         23        DO_FCALL                                      0          
         24        FREE                                                     $11
   15    25        NEW                                              $13     'DateTime'
         26        SEND_VAL_EX                                              ''
         27        NEW                                              $14     'DateTimeZone'
         28        SEND_VAL_EX                                              'Europe%2FLondon'
         29        DO_FCALL                                      0          
         30        SEND_VAR_NO_REF_EX                                       $14
         31        SEND_VAL_EX                                              ''
         32        DO_FCALL                                      0          
         33        FREE                                                     $13
         34      > JMP                                                      ->41
   16    35  E > > CATCH                                       last         'Exception'
   17    36    >   ECHO                                                     'Caught+exception%3A+'
         37        INIT_METHOD_CALL                                         !0, 'getMessage'
         38        DO_FCALL                                      0  $17     
         39        ECHO                                                     $17
         40        ECHO                                                     '%0A'
   18    41    > > RETURN                                                   1

Class Test:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kGKva
function name:  __construct
number of ops:  2
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1      > RETURN                                                   null

End of function __construct

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.42 ms | 1399 KiB | 13 Q