3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dmy = "20-12-2013"; list($day, $month, $year) = explode("-", $dmy); $ymd = "$year-$month-$day"; echo $ymd;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3S6lQ
function name:  (null)
number of ops:  20
compiled vars:  !0 = $dmy, !1 = $day, !2 = $month, !3 = $year, !4 = $ymd
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '20-12-2013'
    3     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '-'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $6      
          5        FETCH_LIST_R                                     $7      $6, 0
          6        ASSIGN                                                   !1, $7
          7        FETCH_LIST_R                                     $9      $6, 1
          8        ASSIGN                                                   !2, $9
          9        FETCH_LIST_R                                     $11     $6, 2
         10        ASSIGN                                                   !3, $11
         11        FREE                                                     $6
    4    12        ROPE_INIT                                     5  ~14     !3
         13        ROPE_ADD                                      1  ~14     ~14, '-'
         14        ROPE_ADD                                      2  ~14     ~14, !2
         15        ROPE_ADD                                      3  ~14     ~14, '-'
         16        ROPE_END                                      4  ~13     ~14, !1
         17        ASSIGN                                                   !4, ~13
    5    18        ECHO                                                     !4
         19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.61 ms | 1395 KiB | 15 Q