3v4l.org

run code in 300+ PHP versions simultaneously
<?php $d = DateTime::createFromFormat('Y-m-d', '2013-01-A'); echo $d && $d->format('Y-m-d') == '2013-01-A';
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 6, Position 2 = 11
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
filename:       /in/4V8NY
function name:  (null)
number of ops:  13
compiled vars:  !0 = $d
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_STATIC_METHOD_CALL                                  'DateTime', 'createFromFormat'
          1        SEND_VAL                                                 'Y-m-d'
          2        SEND_VAL                                                 '2013-01-A'
          3        DO_FCALL                                      0  $1      
          4        ASSIGN                                                   !0, $1
    4     5      > JMPZ_EX                                          ~3      !0, ->11
          6    >   INIT_METHOD_CALL                                         !0, 'format'
          7        SEND_VAL_EX                                              'Y-m-d'
          8        DO_FCALL                                      0  $4      
          9        IS_EQUAL                                         ~5      $4, '2013-01-A'
         10        BOOL                                             ~3      ~5
         11    >   ECHO                                                     ~3
         12      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.82 ms | 1384 KiB | 13 Q