3v4l.org

run code in 500+ PHP versions simultaneously
<?php $anonHeight = 169; //Рост Анона $classmates = array( 'Антон' => 172, 'Семен' => 165, 'Лена' => 189, 'Иван' => 171, 'Петр' => 182, 'Сидор' => 176, 'Аня' => 180, 'Таня' => 179, 'Маня' => 171 ); $array = array_filter($classmates, function($classmate) { if ($classmate > 169) { return true; } else { return false; } }); var_dump($array);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3t6Wi
function name:  (null)
number of ops:  12
compiled vars:  !0 = $anonHeight, !1 = $classmates, !2 = $array
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, 169
    5     1        ASSIGN                                                       !1, <array>
   17     2        INIT_FCALL                                                   'array_filter'
          3        SEND_VAR                                                     !1
          4        DECLARE_LAMBDA_FUNCTION                              ~5      [0]
   23     5        SEND_VAL                                                     ~5
   17     6        DO_ICALL                                             $6      
          7        ASSIGN                                                       !2, $6
   25     8        INIT_FCALL                                                   'var_dump'
          9        SEND_VAR                                                     !2
         10        DO_ICALL                                                     
         11      > RETURN                                                       1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 5
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3t6Wi
function name:  {closure:/in/3t6Wi:17}
number of ops:  7
compiled vars:  !0 = $classmate
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   17     0  E >   RECV                                                 !0      
   18     1        IS_SMALLER                                                   169, !0
          2      > JMPZ                                                         ~1, ->5
   19     3    > > RETURN                                                       <true>
   18     4*       JMP                                                          ->6
   21     5    > > RETURN                                                       <false>
   23     6*     > RETURN                                                       null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
162.39 ms | 2150 KiB | 15 Q