3v4l.org

run code in 300+ PHP versions simultaneously
<?php for ($x=1; $x<6; ++$x) { $unions[] = "SELECT " . ($x==1 ? "$x AS challenge_id, 1 as week_id" : "$x, 1"); $unions[] = "SELECT $x, 6"; } $derived_table = implode(' UNION ',$unions); ECHO $derived_table;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 2
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 8
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 2
Branch analysis from position: 22
Branch analysis from position: 2
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 2
Branch analysis from position: 22
Branch analysis from position: 2
filename:       /in/9e8EJ
function name:  (null)
number of ops:  29
compiled vars:  !0 = $x, !1 = $unions, !2 = $derived_table
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 1
          1      > JMP                                                      ->20
    4     2    >   IS_EQUAL                                                 !0, 1
          3      > JMPZ                                                     ~5, ->8
          4    >   NOP                                                      
          5        FAST_CONCAT                                      ~6      !0, '+AS+challenge_id%2C+1+as+week_id'
          6        QM_ASSIGN                                        ~7      ~6
          7      > JMP                                                      ->11
          8    >   NOP                                                      
          9        FAST_CONCAT                                      ~8      !0, '%2C+1'
         10        QM_ASSIGN                                        ~7      ~8
         11    >   CONCAT                                           ~9      'SELECT+', ~7
         12        ASSIGN_DIM                                               !1
         13        OP_DATA                                                  ~9
    5    14        ROPE_INIT                                     3  ~12     'SELECT+'
         15        ROPE_ADD                                      1  ~12     ~12, !0
         16        ROPE_END                                      2  ~11     ~12, '%2C+6'
         17        ASSIGN_DIM                                               !1
         18        OP_DATA                                                  ~11
    3    19        PRE_INC                                                  !0
         20    >   IS_SMALLER                                               !0, 6
         21      > JMPNZ                                                    ~15, ->2
    7    22    >   INIT_FCALL                                               'implode'
         23        SEND_VAL                                                 '+UNION+'
         24        SEND_VAR                                                 !1
         25        DO_ICALL                                         $16     
         26        ASSIGN                                                   !2, $16
    8    27        ECHO                                                     !2
    9    28      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.46 ms | 1400 KiB | 15 Q