3v4l.org

run code in 300+ PHP versions simultaneously
<?php class a { public function checkDateTime(\DateTime $dateTime) { echo 'done'; $dateTime->getTimestamp(); } } class h { public function handle() { try { $a = new a; echo $a->checkDateTime(null); } catch (Exception $e) { throw $e; } } } $h = new h; $h->handle(null);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IHEnR
function name:  (null)
number of ops:  7
compiled vars:  !0 = $h
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   25     0  E >   NEW                                              $1      'h'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   26     3        INIT_METHOD_CALL                                         !0, 'handle'
          4        SEND_VAL_EX                                              null
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

Class a:
Function checkdatetime:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IHEnR
function name:  checkDateTime
number of ops:  5
compiled vars:  !0 = $dateTime
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    7     1        ECHO                                                     'done'
    8     2        INIT_METHOD_CALL                                         !0, 'getTimestamp'
          3        DO_FCALL                                      0          
    9     4      > RETURN                                                   null

End of function checkdatetime

End of class a.

Class h:
Function handle:
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: 8
Branch analysis from position: 8
2 jumps found. (Code = 107) Position 1 = 9, Position 2 = -2
Branch analysis from position: 9
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/IHEnR
function name:  handle
number of ops:  11
compiled vars:  !0 = $a, !1 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   NEW                                              $2      'a'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   18     3        INIT_METHOD_CALL                                         !0, 'checkDateTime'
          4        SEND_VAL_EX                                              null
          5        DO_FCALL                                      0  $5      
          6        ECHO                                                     $5
          7      > JMP                                                      ->10
   19     8  E > > CATCH                                       last         'Exception'
   20     9    > > THROW                                         0          !1
   22    10    > > RETURN                                                   null

End of function handle

End of class h.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.25 ms | 1395 KiB | 13 Q