3v4l.org

run code in 300+ PHP versions simultaneously
<?php $month=(new \DateTime())->format('m'); $day=(new \DateTime())->format('d'); $year=(new \DateTime())->format('y'); if ($year % 2 == 0) { $yr=1; } else { $yr=2; } echo ($month.$day.$yr); ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 21, Position 2 = 23
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/N2fV1
function name:  (null)
number of ops:  28
compiled vars:  !0 = $month, !1 = $day, !2 = $year, !3 = $yr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    1     0  E >   NEW                                              $4      'DateTime'
          1        DO_FCALL                                      0          
          2        INIT_METHOD_CALL                                         $4, 'format'
          3        SEND_VAL_EX                                              'm'
          4        DO_FCALL                                      0  $6      
          5        ASSIGN                                                   !0, $6
    2     6        NEW                                              $8      'DateTime'
          7        DO_FCALL                                      0          
          8        INIT_METHOD_CALL                                         $8, 'format'
          9        SEND_VAL_EX                                              'd'
         10        DO_FCALL                                      0  $10     
         11        ASSIGN                                                   !1, $10
    3    12        NEW                                              $12     'DateTime'
         13        DO_FCALL                                      0          
         14        INIT_METHOD_CALL                                         $12, 'format'
         15        SEND_VAL_EX                                              'y'
         16        DO_FCALL                                      0  $14     
         17        ASSIGN                                                   !2, $14
    4    18        MOD                                              ~16     !2, 2
         19        IS_EQUAL                                                 ~16, 0
         20      > JMPZ                                                     ~17, ->23
    5    21    >   ASSIGN                                                   !3, 1
         22      > JMP                                                      ->24
    7    23    >   ASSIGN                                                   !3, 2
    9    24    >   CONCAT                                           ~20     !0, !1
         25        CONCAT                                           ~21     ~20, !3
         26        ECHO                                                     ~21
   10    27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
201.31 ms | 1394 KiB | 13 Q