3v4l.org

run code in 300+ PHP versions simultaneously
<?php class test{ const X = 10; static function dotest(){ $arr = array(0 => 5, 1=>12, 2=>7, 3=>5, 4, 13); $ttl = self::X; $valid = array_filter( $arr, function( $item ) use($ttl) { return ( $item < $ttl); }); var_dump($valid); } } test::dotest();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nJ3dV
function name:  (null)
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   INIT_STATIC_METHOD_CALL                                  'test', 'dotest'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   1

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

End of function %00%7Bclosure%7D%2Fin%2FnJ3dV%3A10%240

Class test:
Function dotest:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nJ3dV
function name:  dotest
number of ops:  13
compiled vars:  !0 = $arr, !1 = $ttl, !2 = $valid
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   ASSIGN                                                   !0, <array>
    9     1        ASSIGN                                                   !1, 10
   10     2        INIT_FCALL                                               'array_filter'
          3        SEND_VAR                                                 !0
          4        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FnJ3dV%3A10%240'
          5        BIND_LEXICAL                                             ~5, !1
   12     6        SEND_VAL                                                 ~5
          7        DO_ICALL                                         $6      
   10     8        ASSIGN                                                   !2, $6
   13     9        INIT_FCALL                                               'var_dump'
         10        SEND_VAR                                                 !2
         11        DO_ICALL                                                 
   14    12      > RETURN                                                   null

End of function dotest

End of class test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.74 ms | 1396 KiB | 17 Q