3v4l.org

run code in 300+ PHP versions simultaneously
<?php function converteData($format, $to_format, $date, $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('dmY', 'Y-m-d', '06111992'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tH8HU
function name:  (null)
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'convertedata'
          2        SEND_VAL                                                 'dmY'
          3        SEND_VAL                                                 'Y-m-d'
          4        SEND_VAL                                                 '06111992'
          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/tH8HU
function name:  converteData
number of ops:  24
compiled vars:  !0 = $format, !1 = $to_format, !2 = $date, !3 = $timezone, !4 = $d
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        RECV_INIT                                        !3      null
    5     4        BOOL_NOT                                         ~5      !3
          5      > JMPZ                                                     ~5, ->12
    6     6    >   NEW                                              $6      'DateTimeZone'
          7        INIT_FCALL                                               'date_default_timezone_get'
          8        DO_ICALL                                         $7      
          9        SEND_VAR_NO_REF_EX                                       $7
         10        DO_FCALL                                      0          
         11        ASSIGN                                                   !3, $6
    9    12    >   INIT_FCALL                                               'date_create_from_format'
         13        SEND_VAR                                                 !0
         14        SEND_VAR                                                 !2
         15        SEND_VAR                                                 !3
         16        DO_ICALL                                         $10     
         17        ASSIGN                                                   !4, $10
   10    18        INIT_FCALL                                               'date_format'
         19        SEND_VAR                                                 !4
         20        SEND_VAR                                                 !1
         21        DO_ICALL                                         $12     
         22      > RETURN                                                   $12
   11    23*     > RETURN                                                   null

End of function convertedata

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.09 ms | 1399 KiB | 22 Q