3v4l.org

run code in 300+ PHP versions simultaneously
<?php $var1= ""; $var2= ""; $var3= "3"; $temp_array = array($var1,$var2,$var3); $temp_count =count(array_filter($temp_array)); if($temp_count ==1){ echo "1 variable is not empty"; } else { echo "total variable is = ".$temp_count; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 16
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/17k7K
function name:  (null)
number of ops:  19
compiled vars:  !0 = $var1, !1 = $var2, !2 = $var3, !3 = $temp_array, !4 = $temp_count
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, ''
    3     1        ASSIGN                                                   !1, ''
    4     2        ASSIGN                                                   !2, '3'
    5     3        INIT_ARRAY                                       ~8      !0
          4        ADD_ARRAY_ELEMENT                                ~8      !1
          5        ADD_ARRAY_ELEMENT                                ~8      !2
          6        ASSIGN                                                   !3, ~8
    6     7        INIT_FCALL                                               'array_filter'
          8        SEND_VAR                                                 !3
          9        DO_ICALL                                         $10     
         10        COUNT                                            ~11     $10
         11        ASSIGN                                                   !4, ~11
    7    12        IS_EQUAL                                                 !4, 1
         13      > JMPZ                                                     ~13, ->16
    8    14    >   ECHO                                                     '1+variable+is+not+empty'
         15      > JMP                                                      ->18
   12    16    >   CONCAT                                           ~14     'total+variable++is+%3D+', !4
         17        ECHO                                                     ~14
   13    18    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.29 ms | 1410 KiB | 15 Q