3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { const BAR = 30; public function __construct() { $time = 1377176743; $array = array( 1377176711, 1377176712, 1377176714, 1377176717, ); array_filter($array, function($value) use ($time) { return $value >= $time - static::BAR; }); var_dump($array); } } new Foo;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dYtlV
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   28     0  E >   NEW                                              $0      'Foo'
          1        DO_FCALL                                      0          
          2        FREE                                                     $0
          3      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FdYtlV%3A18%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dYtlV
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $value, !1 = $time
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
   19     2        FETCH_CLASS_CONSTANT                             ~2      'BAR'
          3        SUB                                              ~3      !1, ~2
          4        IS_SMALLER_OR_EQUAL                              ~4      ~3, !0
          5      > RETURN                                                   ~4
   20     6*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FdYtlV%3A18%240

Class Foo:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dYtlV
function name:  __construct
number of ops:  12
compiled vars:  !0 = $time, !1 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   ASSIGN                                                   !0, 1377176743
   11     1        ASSIGN                                                   !1, <array>
   18     2        INIT_FCALL                                               'array_filter'
          3        SEND_VAR                                                 !1
          4        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FdYtlV%3A18%240'
          5        BIND_LEXICAL                                             ~4, !0
   20     6        SEND_VAL                                                 ~4
          7        DO_ICALL                                                 
   23     8        INIT_FCALL                                               'var_dump'
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                                 
   24    11      > RETURN                                                   null

End of function __construct

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.35 ms | 941 KiB | 18 Q