3v4l.org

run code in 300+ PHP versions simultaneously
<?php function converteData($format, $to_format, $time, $timezone = null) { if (!$timezone) { $timezone = new DateTimeZone(date_default_timezone_get()); } $d = date_create_from_format($format, $date, $timezone); return date_format($d, $to_format); } var_dump(converteData('d/m/Y', 'd/m/Y', '06/11/1992'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/g8bqD
function name:  (null)
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'convertedata'
          2        SEND_VAL                                                 'd%2Fm%2FY'
          3        SEND_VAL                                                 'd%2Fm%2FY'
          4        SEND_VAL                                                 '06%2F11%2F1992'
          5        DO_FCALL                                      0  $0      
          6        SEND_VAR                                                 $0
          7        DO_ICALL                                                 
          8      > RETURN                                                   1

Function convertedata:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 12
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
filename:       /in/g8bqD
function name:  converteData
number of ops:  24
compiled vars:  !0 = $format, !1 = $to_format, !2 = $time, !3 = $timezone, !4 = $d, !5 = $date
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        RECV_INIT                                        !3      null
    4     4        BOOL_NOT                                         ~6      !3
          5      > JMPZ                                                     ~6, ->12
    5     6    >   NEW                                              $7      'DateTimeZone'
          7        INIT_FCALL                                               'date_default_timezone_get'
          8        DO_ICALL                                         $8      
          9        SEND_VAR_NO_REF_EX                                       $8
         10        DO_FCALL                                      0          
         11        ASSIGN                                                   !3, $7
    8    12    >   INIT_FCALL                                               'date_create_from_format'
         13        SEND_VAR                                                 !0
         14        SEND_VAR                                                 !5
         15        SEND_VAR                                                 !3
         16        DO_ICALL                                         $11     
         17        ASSIGN                                                   !4, $11
    9    18        INIT_FCALL                                               'date_format'
         19        SEND_VAR                                                 !4
         20        SEND_VAR                                                 !1
         21        DO_ICALL                                         $13     
         22      > RETURN                                                   $13
   10    23*     > RETURN                                                   null

End of function convertedata

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.55 ms | 1398 KiB | 22 Q