3v4l.org

run code in 300+ PHP versions simultaneously
<?php //Enter your code here, enjoy! $array = array("1" => "PHP code tester Sandbox Online", "foo" => "bar", 5 , 5 => 89009, "case" => "Random Stuff", "PHP Version" => phpversion() ); $a = array_filter( $array, function($e){ return $e=='1'; }, ARRAY_FILTER_USE_KEY ); var_dump($a);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GM6mR
function name:  (null)
number of ops:  20
compiled vars:  !0 = $array, !1 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_ARRAY                                       ~2      'PHP+code+tester+Sandbox+Online', 1
    6     1        ADD_ARRAY_ELEMENT                                ~2      'bar', 'foo'
          2        ADD_ARRAY_ELEMENT                                ~2      5
          3        ADD_ARRAY_ELEMENT                                ~2      89009, 5
    7     4        ADD_ARRAY_ELEMENT                                ~2      'Random+Stuff', 'case'
    8     5        INIT_FCALL                                               'phpversion'
          6        DO_ICALL                                         $3      
          7        ADD_ARRAY_ELEMENT                                ~2      $3, 'PHP+Version'
    5     8        ASSIGN                                                   !0, ~2
   11     9        INIT_FCALL                                               'array_filter'
         10        SEND_VAR                                                 !0
         11        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FGM6mR%3A11%240'
   13    12        SEND_VAL                                                 ~5
         13        SEND_VAL                                                 2
         14        DO_ICALL                                         $6      
   11    15        ASSIGN                                                   !1, $6
   14    16        INIT_FCALL                                               'var_dump'
         17        SEND_VAR                                                 !1
         18        DO_ICALL                                                 
         19      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FGM6mR%3A11%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GM6mR
function name:  {closure}
number of ops:  4
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
   12     1        IS_EQUAL                                         ~1      !0, '1'
          2      > RETURN                                                   ~1
   13     3*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FGM6mR%3A11%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.05 ms | 1395 KiB | 19 Q