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) { echo "evaluating $value against $time and " . static::BAR . "\n"; 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/f1jSl
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   29     0  E >   NEW                                              $0      'Foo'
          1        DO_FCALL                                      0          
          2        FREE                                                     $0
          3      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2Ff1jSl%3A18%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/f1jSl
function name:  {closure}
number of ops:  16
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        ROPE_INIT                                     5  ~3      'evaluating+'
          3        ROPE_ADD                                      1  ~3      ~3, !0
          4        ROPE_ADD                                      2  ~3      ~3, '+against+'
          5        ROPE_ADD                                      3  ~3      ~3, !1
          6        ROPE_END                                      4  ~2      ~3, '+and+'
          7        FETCH_CLASS_CONSTANT                             ~6      'BAR'
          8        CONCAT                                           ~7      ~2, ~6
          9        CONCAT                                           ~8      ~7, '%0A'
         10        ECHO                                                     ~8
   20    11        FETCH_CLASS_CONSTANT                             ~9      'BAR'
         12        SUB                                              ~10     !1, ~9
         13        IS_SMALLER_OR_EQUAL                              ~11     ~10, !0
         14      > RETURN                                                   ~11
   21    15*     > RETURN                                                   null

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

Class Foo:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/f1jSl
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%2Ff1jSl%3A18%240'
          5        BIND_LEXICAL                                             ~4, !0
   21     6        SEND_VAL                                                 ~4
          7        DO_ICALL                                                 
   24     8        INIT_FCALL                                               'var_dump'
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                                 
   25    11      > RETURN                                                   null

End of function __construct

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.5 ms | 1396 KiB | 17 Q