3v4l.org

run code in 300+ PHP versions simultaneously
<?php function format(string $s) { print $s . ' is interprted as ' . date('r', strtotime($s)) . PHP_EOL; } format('5/6/22'); format('5.6.22'); format('5-6-22'); format('5/6/2022'); format('5.6.2022'); format('5-6-2022');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dHqTd
function name:  (null)
number of ops:  19
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                               'format'
          1        SEND_VAL                                                 '5%2F6%2F22'
          2        DO_FCALL                                      0          
    9     3        INIT_FCALL                                               'format'
          4        SEND_VAL                                                 '5.6.22'
          5        DO_FCALL                                      0          
   10     6        INIT_FCALL                                               'format'
          7        SEND_VAL                                                 '5-6-22'
          8        DO_FCALL                                      0          
   11     9        INIT_FCALL                                               'format'
         10        SEND_VAL                                                 '5%2F6%2F2022'
         11        DO_FCALL                                      0          
   12    12        INIT_FCALL                                               'format'
         13        SEND_VAL                                                 '5.6.2022'
         14        DO_FCALL                                      0          
   13    15        INIT_FCALL                                               'format'
         16        SEND_VAL                                                 '5-6-2022'
         17        DO_FCALL                                      0          
         18      > RETURN                                                   1

Function format:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dHqTd
function name:  format
number of ops:  13
compiled vars:  !0 = $s
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    5     1        CONCAT                                           ~1      !0, '+is+interprted+as+'
          2        INIT_FCALL                                               'date'
          3        SEND_VAL                                                 'r'
          4        INIT_FCALL                                               'strtotime'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $2      
          7        SEND_VAR                                                 $2
          8        DO_ICALL                                         $3      
          9        CONCAT                                           ~4      ~1, $3
         10        CONCAT                                           ~5      ~4, '%0A'
         11        ECHO                                                     ~5
    6    12      > RETURN                                                   null

End of function format

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
176.14 ms | 1403 KiB | 23 Q