3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $fecha = "21/04/2015 12:03:59"; list($d, $M, $y, $h, $m, $s) = preg_split("/[\s,\/:]+/",$fecha); echo "\n->"; echo date("Y-m-d H:i:s",strtotime("$d-$M-$y $h:$m:$s"));//Ganadora echo "\n->"; echo date("Y-m-d H:i:s",strtotime("2015-20-04 19:11:33")); echo "\n->"; echo strtotime("20/04/2015 19:11:33") . 'No funciona'; echo "\n->"; echo date("Y-m-d H:i:s", 1429635779 - 7*60*60);
based on PMvaZ
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Hrr4M
function name:  (null)
number of ops:  60
compiled vars:  !0 = $fecha, !1 = $d, !2 = $M, !3 = $y, !4 = $h, !5 = $m, !6 = $s
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   2     0  E >   ASSIGN                                                   !0, '21%2F04%2F2015+12%3A03%3A59'
   3     1        INIT_FCALL                                               'preg_split'
         2        SEND_VAL                                                 '%2F%5B%5Cs%2C%5C%2F%3A%5D%2B%2F'
         3        SEND_VAR                                                 !0
         4        DO_ICALL                                         $8      
         5        FETCH_LIST                                       $9      $8, 0
         6        ASSIGN                                                   !1, $9
         7        FETCH_LIST                                       $11     $8, 1
         8        ASSIGN                                                   !2, $11
         9        FETCH_LIST                                       $13     $8, 2
        10        ASSIGN                                                   !3, $13
        11        FETCH_LIST                                       $15     $8, 3
        12        ASSIGN                                                   !4, $15
        13        FETCH_LIST                                       $17     $8, 4
        14        ASSIGN                                                   !5, $17
        15        FETCH_LIST                                       $19     $8, 5
        16        ASSIGN                                                   !6, $19
        17        FREE                                                     $8
   4    18        ECHO                                                     '%0A-%3E'
   5    19        INIT_FCALL                                               'date'
        20        SEND_VAL                                                 'Y-m-d+H%3Ai%3As'
        21        INIT_FCALL                                               'strtotime'
        22        ROPE_INIT                                    11  ~22     !1
        23        ROPE_ADD                                      1  ~22     ~22, '-'
        24        ROPE_ADD                                      2  ~22     ~22, !2
        25        ROPE_ADD                                      3  ~22     ~22, '-'
        26        ROPE_ADD                                      4  ~22     ~22, !3
        27        ROPE_ADD                                      5  ~22     ~22, '+'
        28        ROPE_ADD                                      6  ~22     ~22, !4
        29        ROPE_ADD                                      7  ~22     ~22, '%3A'
        30        ROPE_ADD                                      8  ~22     ~22, !5
        31        ROPE_ADD                                      9  ~22     ~22, '%3A'
        32        ROPE_END                                     10  ~21     ~22, !6
        33        SEND_VAL                                                 ~21
        34        DO_ICALL                                         $28     
        35        SEND_VAR                                                 $28
        36        DO_ICALL                                         $29     
        37        ECHO                                                     $29
   6    38        ECHO                                                     '%0A-%3E'
   7    39        INIT_FCALL                                               'date'
        40        SEND_VAL                                                 'Y-m-d+H%3Ai%3As'
        41        INIT_FCALL                                               'strtotime'
        42        SEND_VAL                                                 '2015-20-04+19%3A11%3A33'
        43        DO_ICALL                                         $30     
        44        SEND_VAR                                                 $30
        45        DO_ICALL                                         $31     
        46        ECHO                                                     $31
   8    47        ECHO                                                     '%0A-%3E'
   9    48        INIT_FCALL                                               'strtotime'
        49        SEND_VAL                                                 '20%2F04%2F2015+19%3A11%3A33'
        50        DO_ICALL                                         $32     
        51        CONCAT                                           ~33     $32, 'No+funciona'
        52        ECHO                                                     ~33
  10    53        ECHO                                                     '%0A-%3E'
  11    54        INIT_FCALL                                               'date'
        55        SEND_VAL                                                 'Y-m-d+H%3Ai%3As'
        56        SEND_VAL                                                 1429610579
        57        DO_ICALL                                         $34     
        58        ECHO                                                     $34
        59      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 7.3.0