3v4l.org

run code in 500+ PHP versions simultaneously
<?php $mask = 210; $binary = decbin($mask); // "11010010" $tmp = str_split($binary, 1); $tmp[] = 0; $expected = array_keys( array_filter( array_reverse($tmp) ) ); var_dump($expected);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JEQcG
function name:  (null)
number of ops:  26
compiled vars:  !0 = $mask, !1 = $binary, !2 = $tmp, !3 = $expected
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, 210
    4     1        INIT_FCALL                                                   'decbin'
          2        SEND_VAR                                                     !0
          3        DO_ICALL                                             $5      
          4        ASSIGN                                                       !1, $5
    6     5        INIT_FCALL                                                   'str_split'
          6        SEND_VAR                                                     !1
          7        SEND_VAL                                                     1
          8        DO_ICALL                                             $7      
          9        ASSIGN                                                       !2, $7
    7    10        ASSIGN_DIM                                                   !2
         11        OP_DATA                                                      0
    8    12        INIT_FCALL                                                   'array_keys'
    9    13        INIT_FCALL                                                   'array_filter'
   10    14        INIT_FCALL                                                   'array_reverse'
         15        SEND_VAR                                                     !2
         16        DO_ICALL                                             $10     
         17        SEND_VAR                                                     $10
    9    18        DO_ICALL                                             $11     
   10    19        SEND_VAR                                                     $11
    8    20        DO_ICALL                                             $12     
         21        ASSIGN                                                       !3, $12
   13    22        INIT_FCALL                                                   'var_dump'
         23        SEND_VAR                                                     !3
         24        DO_ICALL                                                     
         25      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
212.71 ms | 2757 KiB | 19 Q