3v4l.org

run code in 300+ PHP versions simultaneously
<?php $months = array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"); $yes = 0; for ($i = 0; $i < 12; ++$i) { $result = date('F',strtotime($months[$i] . " 15")); if ($result != $months[$i]) { $correct = "no"; } else { $correct = "yes"; $yes++; } echo $correct . " - " . $result . "\n"; } echo "\n" . $yes . " / 12 correct months."; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
2 jumps found. (Code = 44) Position 1 = 28, Position 2 = 4
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 19
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
2 jumps found. (Code = 44) Position 1 = 28, Position 2 = 4
Branch analysis from position: 28
Branch analysis from position: 4
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 28, Position 2 = 4
Branch analysis from position: 28
Branch analysis from position: 4
filename:       /in/23rKJ
function name:  (null)
number of ops:  32
compiled vars:  !0 = $months, !1 = $yes, !2 = $i, !3 = $result, !4 = $correct
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        ASSIGN                                                   !1, 0
    5     2        ASSIGN                                                   !2, 0
          3      > JMP                                                      ->26
    6     4    >   INIT_FCALL                                               'date'
          5        SEND_VAL                                                 'F'
          6        INIT_FCALL                                               'strtotime'
          7        FETCH_DIM_R                                      ~8      !0, !2
          8        CONCAT                                           ~9      ~8, '+15'
          9        SEND_VAL                                                 ~9
         10        DO_ICALL                                         $10     
         11        SEND_VAR                                                 $10
         12        DO_ICALL                                         $11     
         13        ASSIGN                                                   !3, $11
    8    14        FETCH_DIM_R                                      ~13     !0, !2
         15        IS_NOT_EQUAL                                             !3, ~13
         16      > JMPZ                                                     ~14, ->19
    9    17    >   ASSIGN                                                   !4, 'no'
         18      > JMP                                                      ->21
   11    19    >   ASSIGN                                                   !4, 'yes'
   12    20        PRE_INC                                                  !1
   14    21    >   CONCAT                                           ~18     !4, '+-+'
         22        CONCAT                                           ~19     ~18, !3
         23        CONCAT                                           ~20     ~19, '%0A'
         24        ECHO                                                     ~20
    5    25        PRE_INC                                                  !2
         26    >   IS_SMALLER                                               !2, 12
         27      > JMPNZ                                                    ~22, ->4
   16    28    >   CONCAT                                           ~23     '%0A', !1
         29        CONCAT                                           ~24     ~23, '+%2F+12+correct+months.'
         30        ECHO                                                     ~24
   17    31      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.09 ms | 1396 KiB | 17 Q