3v4l.org

run code in 300+ PHP versions simultaneously
<?php class SerialDateTime extends DateTime implements JsonSerializable{ public function jsonSerialize(){ return ['timestamp' => $this->getTimestamp()]; } public static function createFromFormat($x,$y,$z=NULL){ $a = call_user_func_array(array(__CLASS__ , 'parent::'.__FUNCTION__), func_get_args()); $b = new self(); return $b->setTimestamp($a->getTimestamp()); } } echo json_encode([SerialDateTime::createFromFormat('m/d/Y', '10/31/2011')]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/boqOg
function name:  (null)
number of ops:  11
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CLASS                                            'serialdatetime', 'datetime'
   16     1        INIT_FCALL                                               'json_encode'
          2        INIT_STATIC_METHOD_CALL                                  'SerialDateTime', 'createFromFormat'
          3        SEND_VAL_EX                                              'm%2Fd%2FY'
          4        SEND_VAL_EX                                              '10%2F31%2F2011'
          5        DO_FCALL                                      0  $0      
          6        INIT_ARRAY                                       ~1      $0
          7        SEND_VAL                                                 ~1
          8        DO_ICALL                                         $2      
          9        ECHO                                                     $2
         10      > RETURN                                                   1

Class SerialDateTime:
Function jsonserialize:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/boqOg
function name:  jsonSerialize
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INIT_METHOD_CALL                                         'getTimestamp'
          1        DO_FCALL                                      0  $0      
          2        INIT_ARRAY                                       ~1      $0, 'timestamp'
          3      > RETURN                                                   ~1
    7     4*     > RETURN                                                   null

End of function jsonserialize

Function createfromformat:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/boqOg
function name:  createFromFormat
number of ops:  19
compiled vars:  !0 = $x, !1 = $y, !2 = $z, !3 = $a, !4 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV_INIT                                        !2      null
   10     3        INIT_USER_CALL                                0          'call_user_func_array', <array>
          4        FUNC_GET_ARGS                                    ~5      
          5        SEND_ARRAY                                               ~5
          6        CHECK_UNDEF_ARGS                                         
          7        DO_FCALL                                      0  $6      
          8        ASSIGN                                                   !3, $6
   11     9        NEW                          self                $8      
         10        DO_FCALL                                      0          
         11        ASSIGN                                                   !4, $8
   12    12        INIT_METHOD_CALL                                         !4, 'setTimestamp'
         13        INIT_METHOD_CALL                                         !3, 'getTimestamp'
         14        DO_FCALL                                      0  $11     
         15        SEND_VAR_NO_REF_EX                                       $11
         16        DO_FCALL                                      0  $12     
         17      > RETURN                                                   $12
   13    18*     > RETURN                                                   null

End of function createfromformat

End of class SerialDateTime.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.64 ms | 1405 KiB | 15 Q