3v4l.org

run code in 300+ PHP versions simultaneously
<?php $datestr = "01/06/2017"; $realdate = DateTime::createFromFormat('d/m/Y', $datestr); $datestr2 = date_format($realdate,'m/Y'); echo "date in: $datestr\n"; echo "date out: $datestr2\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kT8WQ
function name:  (null)
number of ops:  20
compiled vars:  !0 = $datestr, !1 = $realdate, !2 = $datestr2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '01%2F06%2F2017'
    5     1        INIT_STATIC_METHOD_CALL                                  'DateTime', 'createFromFormat'
          2        SEND_VAL                                                 'd%2Fm%2FY'
          3        SEND_VAR                                                 !0
          4        DO_FCALL                                      0  $4      
          5        ASSIGN                                                   !1, $4
    6     6        INIT_FCALL                                               'date_format'
          7        SEND_VAR                                                 !1
          8        SEND_VAL                                                 'm%2FY'
          9        DO_ICALL                                         $6      
         10        ASSIGN                                                   !2, $6
    8    11        ROPE_INIT                                     3  ~9      'date+in%3A+'
         12        ROPE_ADD                                      1  ~9      ~9, !0
         13        ROPE_END                                      2  ~8      ~9, '%0A'
         14        ECHO                                                     ~8
    9    15        ROPE_INIT                                     3  ~12     'date+out%3A+'
         16        ROPE_ADD                                      1  ~12     ~12, !2
         17        ROPE_END                                      2  ~11     ~12, '%0A'
         18        ECHO                                                     ~11
         19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
280.41 ms | 1010 KiB | 14 Q