3v4l.org

run code in 500+ PHP versions simultaneously
<?php $recentlyViewed = $products = range(1,10); echo '$recentlyViewed =>'; print_R($recentlyViewed); echo '$products =>'; print_R($products); $products = range(1,10); $recentlyViewed = ($products) ? true : false; echo '$products =>'; print_R($products); print_R('$recentlyViewed =>'.$recentlyViewed);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 22
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mADet
function name:  (null)
number of ops:  33
compiled vars:  !0 = $recentlyViewed, !1 = $products
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                                   'range'
          1        SEND_VAL                                                     1
          2        SEND_VAL                                                     10
          3        DO_ICALL                                             $2      
          4        ASSIGN                                               ~3      !1, $2
          5        ASSIGN                                                       !0, ~3
    4     6        ECHO                                                         '%24recentlyViewed+%3D%3E'
    5     7        INIT_FCALL                                                   'print_r'
          8        SEND_VAR                                                     !0
          9        DO_ICALL                                                     
    6    10        ECHO                                                         '%24products+%3D%3E'
    7    11        INIT_FCALL                                                   'print_r'
         12        SEND_VAR                                                     !1
         13        DO_ICALL                                                     
    8    14        INIT_FCALL                                                   'range'
         15        SEND_VAL                                                     1
         16        SEND_VAL                                                     10
         17        DO_ICALL                                             $7      
         18        ASSIGN                                                       !1, $7
    9    19      > JMPZ                                                         !1, ->22
         20    >   QM_ASSIGN                                            ~9      <true>
         21      > JMP                                                          ->23
         22    >   QM_ASSIGN                                            ~9      <false>
         23    >   ASSIGN                                                       !0, ~9
   10    24        ECHO                                                         '%24products+%3D%3E'
   11    25        INIT_FCALL                                                   'print_r'
         26        SEND_VAR                                                     !1
         27        DO_ICALL                                                     
   12    28        INIT_FCALL                                                   'print_r'
         29        CONCAT                                               ~12     '%24recentlyViewed+%3D%3E', !0
         30        SEND_VAL                                                     ~12
         31        DO_ICALL                                                     
         32      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
165.64 ms | 2284 KiB | 15 Q