3v4l.org

run code in 300+ PHP versions simultaneously
<?php set_error_handler(function($errno, $errstr){ throw new Exception($errstr);}); class DateTimeCustom extends DateTime { public function __construct($datetime, $timezone = null) { try { parent::__construct($datetime, $timezone); } catch (Exception $e) { var_dump($this, parent::getLastErrors()/*, parent::format('c')*/); } } } $date = new DateTimeCustom("sunday 09 blabla 2001 103:46:40 CEST");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/f5IdQ
function name:  (null)
number of ops:  9
compiled vars:  !0 = $date
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'set_error_handler'
          1        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2Ff5IdQ%3A3%240'
          2        SEND_VAL                                                 ~1
          3        DO_ICALL                                                 
   21     4        NEW                                              $3      'DateTimeCustom'
          5        SEND_VAL_EX                                              'sunday+09+blabla+2001+103%3A46%3A40+CEST'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !0, $3
          8      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2Ff5IdQ%3A3%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/f5IdQ
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $errno, !1 = $errstr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        NEW                                              $2      'Exception'
          3        SEND_VAR_EX                                              !1
          4        DO_FCALL                                      0          
          5      > THROW                                         0          $2
          6*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2Ff5IdQ%3A3%240

Class DateTimeCustom:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 7
Branch analysis from position: 7
2 jumps found. (Code = 107) Position 1 = 8, Position 2 = -2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/f5IdQ
function name:  __construct
number of ops:  16
compiled vars:  !0 = $datetime, !1 = $timezone, !2 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      null
   11     2        INIT_STATIC_METHOD_CALL                                  
          3        SEND_VAR_EX                                              !0
          4        SEND_VAR_EX                                              !1
          5        DO_FCALL                                      0          
          6      > JMP                                                      ->15
   13     7  E > > CATCH                                       last         'Exception'
   15     8    >   INIT_FCALL                                               'var_dump'
          9        FETCH_THIS                                       ~4      
         10        SEND_VAL                                                 ~4
         11        INIT_STATIC_METHOD_CALL                                  'getLastErrors'
         12        DO_FCALL                                      0  $5      
         13        SEND_VAR                                                 $5
         14        DO_ICALL                                                 
   17    15    > > RETURN                                                   null

End of function __construct

End of class DateTimeCustom.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.04 ms | 1392 KiB | 17 Q