3v4l.org

run code in 300+ PHP versions simultaneously
<?php $options = [ 'conditions' => ['foo', 'bar'], 'join' => 'eat pork', ]; $options = $options + array( 'conditions' => null, 'orderby' => null, 'groupby' => null, 'join' => null, ); $where_section = (array) $options['conditions']; $order_section = (array) $options['orderby']; $group_section = (array) $options['groupby']; $join_section = (array) $options['join']; var_dump($where_section, $order_section, $group_section, $join_section);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NvLWd
function name:  (null)
number of ops:  22
compiled vars:  !0 = $options, !1 = $where_section, !2 = $order_section, !3 = $group_section, !4 = $join_section
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    9     1        ADD                                              ~6      !0, <array>
    8     2        ASSIGN                                                   !0, ~6
   15     3        FETCH_DIM_R                                      ~8      !0, 'conditions'
          4        CAST                                          7  ~9      ~8
          5        ASSIGN                                                   !1, ~9
   16     6        FETCH_DIM_R                                      ~11     !0, 'orderby'
          7        CAST                                          7  ~12     ~11
          8        ASSIGN                                                   !2, ~12
   17     9        FETCH_DIM_R                                      ~14     !0, 'groupby'
         10        CAST                                          7  ~15     ~14
         11        ASSIGN                                                   !3, ~15
   18    12        FETCH_DIM_R                                      ~17     !0, 'join'
         13        CAST                                          7  ~18     ~17
         14        ASSIGN                                                   !4, ~18
   20    15        INIT_FCALL                                               'var_dump'
         16        SEND_VAR                                                 !1
         17        SEND_VAR                                                 !2
         18        SEND_VAR                                                 !3
         19        SEND_VAR                                                 !4
         20        DO_ICALL                                                 
         21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.92 ms | 1386 KiB | 15 Q