3v4l.org

run code in 300+ PHP versions simultaneously
<?php $firstOfMonth = "2011-01-01"; echo "firstOfMonth: " . $firstOfMonth . "\n"; $firstOfMonthDate = \DateTime::createFromFormat('Y-m-d|', $firstOfMonth); var_dump($firstOfMonthDate);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Nd7GB
function name:  (null)
number of ops:  13
compiled vars:  !0 = $firstOfMonth, !1 = $firstOfMonthDate
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '2011-01-01'
    3     1        CONCAT                                           ~3      'firstOfMonth%3A+', !0
          2        CONCAT                                           ~4      ~3, '%0A'
          3        ECHO                                                     ~4
    4     4        INIT_STATIC_METHOD_CALL                                  'DateTime', 'createFromFormat'
          5        SEND_VAL                                                 'Y-m-d%7C'
          6        SEND_VAR                                                 !0
          7        DO_FCALL                                      0  $5      
          8        ASSIGN                                                   !1, $5
    5     9        INIT_FCALL                                               'var_dump'
         10        SEND_VAR                                                 !1
         11        DO_ICALL                                                 
         12      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.81 ms | 1394 KiB | 15 Q