3v4l.org

run code in 300+ PHP versions simultaneously
<?php $d = '23/02/2013 16:12:59'; $match = '/\b(0[1-9]|[12][0-9]|3[01])\/(0[1-9]|1[012])\/\d{4}(\s(0[1-9]|1[012]))?\b/'; var_dump(preg_match($match, $d)); exit; $t = new DateTime(str_replace('/', '-', $d)); print $t->format('d/m/Y');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/uamBD
function name:  (null)
number of ops:  24
compiled vars:  !0 = $d, !1 = $match, !2 = $t
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '23%2F02%2F2013+16%3A12%3A59'
    5     1        ASSIGN                                                   !1, '%2F%5Cb%280%5B1-9%5D%7C%5B12%5D%5B0-9%5D%7C3%5B01%5D%29%5C%2F%280%5B1-9%5D%7C1%5B012%5D%29%5C%2F%5Cd%7B4%7D%28%5Cs%280%5B1-9%5D%7C1%5B012%5D%29%29%3F%5Cb%2F'
    7     2        INIT_FCALL                                               'var_dump'
          3        INIT_FCALL                                               'preg_match'
          4        SEND_VAR                                                 !1
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $5      
          7        SEND_VAR                                                 $5
          8        DO_ICALL                                                 
    9     9      > EXIT                                                     
   10    10*       NEW                                              $7      'DateTime'
         11*       INIT_FCALL                                               'str_replace'
         12*       SEND_VAL                                                 '%2F'
         13*       SEND_VAL                                                 '-'
         14*       SEND_VAR                                                 !0
         15*       DO_ICALL                                         $8      
         16*       SEND_VAR_NO_REF_EX                                       $8
         17*       DO_FCALL                                      0          
         18*       ASSIGN                                                   !2, $7
   12    19*       INIT_METHOD_CALL                                         !2, 'format'
         20*       SEND_VAL_EX                                              'd%2Fm%2FY'
         21*       DO_FCALL                                      0  $11     
         22*       ECHO                                                     $11
         23*     > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.51 ms | 1386 KiB | 19 Q