3v4l.org

run code in 300+ PHP versions simultaneously
<?php $cell_content = '10-02-2014'; $cell_content = implode('-', array_reverse(explode('-', $cell_content))); $c2 = preg_replace('/(\d{2})-(\d{2})-(\d{4})/', "\3-\2-\1", $cell_content); echo $cell_content; echo $c2;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/otDSb
function name:  (null)
number of ops:  22
compiled vars:  !0 = $cell_content, !1 = $c2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '10-02-2014'
    3     1        INIT_FCALL                                               'implode'
          2        SEND_VAL                                                 '-'
          3        INIT_FCALL                                               'array_reverse'
          4        INIT_FCALL                                               'explode'
          5        SEND_VAL                                                 '-'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $3      
          8        SEND_VAR                                                 $3
          9        DO_ICALL                                         $4      
         10        SEND_VAR                                                 $4
         11        DO_ICALL                                         $5      
         12        ASSIGN                                                   !0, $5
    4    13        INIT_FCALL                                               'preg_replace'
         14        SEND_VAL                                                 '%2F%28%5Cd%7B2%7D%29-%28%5Cd%7B2%7D%29-%28%5Cd%7B4%7D%29%2F'
         15        SEND_VAL                                                 '%03-%02-%01'
         16        SEND_VAR                                                 !0
         17        DO_ICALL                                         $7      
         18        ASSIGN                                                   !1, $7
    5    19        ECHO                                                     !0
    6    20        ECHO                                                     !1
         21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
201.65 ms | 1399 KiB | 21 Q