3v4l.org

run code in 300+ PHP versions simultaneously
<?php setlocale(nl_NL); function my_strftime ($format, $timestamp) { $format = str_replace('%O', date('S', $timestamp), $format); return strftime($format, $timestamp); } echo my_strftime('%d%O -%m-%Y', time());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6SAro
function name:  (null)
number of ops:  12
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'setlocale'
          1        FETCH_CONSTANT                                   ~0      'nl_NL'
          2        SEND_VAL                                                 ~0
          3        DO_ICALL                                                 
    9     4        INIT_FCALL                                               'my_strftime'
          5        SEND_VAL                                                 '%25d%25O+-%25m-%25Y'
          6        INIT_FCALL                                               'time'
          7        DO_ICALL                                         $2      
          8        SEND_VAR                                                 $2
          9        DO_FCALL                                      0  $3      
         10        ECHO                                                     $3
         11      > RETURN                                                   1

Function my_strftime:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6SAro
function name:  my_strftime
number of ops:  18
compiled vars:  !0 = $format, !1 = $timestamp
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    5     2        INIT_FCALL                                               'str_replace'
          3        SEND_VAL                                                 '%25O'
          4        INIT_FCALL                                               'date'
          5        SEND_VAL                                                 'S'
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                         $2      
          8        SEND_VAR                                                 $2
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                         $3      
         11        ASSIGN                                                   !0, $3
    6    12        INIT_FCALL                                               'strftime'
         13        SEND_VAR                                                 !0
         14        SEND_VAR                                                 !1
         15        DO_ICALL                                         $5      
         16      > RETURN                                                   $5
    7    17*     > RETURN                                                   null

End of function my_strftime

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.21 ms | 1390 KiB | 24 Q