3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Zend_Json { public static function encode($var) { return json_encode($var); } } $brand = null; $category = null; $type = null; /////////////////////////////////////////////////////// $atLeastOneIsSelected = array(); $atLeastOneIsSelected = array_filter(array($brand, $category, $type)); if (sizeof ($atLeastOneIsSelected) < 1) { echo \Zend_Json::encode(array('success' => false)); exit; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 19
Branch analysis from position: 14
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HIDJ5
function name:  (null)
number of ops:  20
compiled vars:  !0 = $brand, !1 = $category, !2 = $type, !3 = $atLeastOneIsSelected
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   ASSIGN                                                   !0, null
   10     1        ASSIGN                                                   !1, null
   11     2        ASSIGN                                                   !2, null
   15     3        ASSIGN                                                   !3, <array>
   16     4        INIT_FCALL                                               'array_filter'
          5        INIT_ARRAY                                       ~8      !0
          6        ADD_ARRAY_ELEMENT                                ~8      !1
          7        ADD_ARRAY_ELEMENT                                ~8      !2
          8        SEND_VAL                                                 ~8
          9        DO_ICALL                                         $9      
         10        ASSIGN                                                   !3, $9
   17    11        COUNT                                            ~11     !3
         12        IS_SMALLER                                               ~11, 1
         13      > JMPZ                                                     ~12, ->19
   18    14    >   INIT_STATIC_METHOD_CALL                                  'Zend_Json', 'encode'
         15        SEND_VAL                                                 <array>
         16        DO_FCALL                                      0  $13     
         17        ECHO                                                     $13
   19    18      > EXIT                                                     
   20    19    > > RETURN                                                   1

Class Zend_Json:
Function encode:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HIDJ5
function name:  encode
number of ops:  6
compiled vars:  !0 = $var
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    5     1        INIT_FCALL                                               'json_encode'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $1      
          4      > RETURN                                                   $1
    6     5*     > RETURN                                                   null

End of function encode

End of class Zend_Json.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.55 ms | 1396 KiB | 17 Q