3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tests = array( '2012-12-04', '12/04/2012', '12/13/2012', '13/12/2012', '04/12/2012' ); foreach($tests as $test){ $ts = strtotime($test); echo "$test : $ts : ".date('Y-m-d', $ts)." \n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 19
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 19
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/t4Iud
function name:  (null)
number of ops:  21
compiled vars:  !0 = $tests, !1 = $test, !2 = $ts
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    9     1      > FE_RESET_R                                       $4      !0, ->19
          2    > > FE_FETCH_R                                               $4, !1, ->19
   10     3    >   INIT_FCALL                                               'strtotime'
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                         $5      
          6        ASSIGN                                                   !2, $5
   11     7        ROPE_INIT                                     4  ~8      !1
          8        ROPE_ADD                                      1  ~8      ~8, '+%3A+'
          9        ROPE_ADD                                      2  ~8      ~8, !2
         10        ROPE_END                                      3  ~7      ~8, '+%3A+'
         11        INIT_FCALL                                               'date'
         12        SEND_VAL                                                 'Y-m-d'
         13        SEND_VAR                                                 !2
         14        DO_ICALL                                         $10     
         15        CONCAT                                           ~11     ~7, $10
         16        CONCAT                                           ~12     ~11, '+%0A'
         17        ECHO                                                     ~12
    9    18      > JMP                                                      ->2
         19    >   FE_FREE                                                  $4
   12    20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.53 ms | 1395 KiB | 17 Q