3v4l.org

run code in 300+ PHP versions simultaneously
<?php $number = 12345; $last = substr($number, -1); echo in_array($last, array(1, 3, 5, 7, 9)) ? "odd" : "even";
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 13
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9cGQu
function name:  (null)
number of ops:  16
compiled vars:  !0 = $number, !1 = $last
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 12345
    4     1        INIT_FCALL                                               'substr'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 -1
          4        DO_ICALL                                         $3      
          5        ASSIGN                                                   !1, $3
    6     6        INIT_FCALL                                               'in_array'
          7        SEND_VAR                                                 !1
          8        SEND_VAL                                                 <array>
          9        DO_ICALL                                         $5      
         10      > JMPZ                                                     $5, ->13
         11    >   QM_ASSIGN                                        ~6      'odd'
         12      > JMP                                                      ->14
         13    >   QM_ASSIGN                                        ~6      'even'
         14    >   ECHO                                                     ~6
         15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
140.02 ms | 1010 KiB | 15 Q