3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump(count(null)); var_dump(count(0)); var_dump(count('zero')); var_dump(count(5)); class Foo implements Countable { public function count() { return 4; } } var_dump(is_array(new Foo));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LqmvK
function name:  (null)
number of ops:  24
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'var_dump'
          1        COUNT                                            ~0      null
          2        SEND_VAL                                                 ~0
          3        DO_ICALL                                                 
    4     4        INIT_FCALL                                               'var_dump'
          5        COUNT                                            ~2      0
          6        SEND_VAL                                                 ~2
          7        DO_ICALL                                                 
    5     8        INIT_FCALL                                               'var_dump'
          9        COUNT                                            ~4      'zero'
         10        SEND_VAL                                                 ~4
         11        DO_ICALL                                                 
    6    12        INIT_FCALL                                               'var_dump'
         13        COUNT                                            ~6      5
         14        SEND_VAL                                                 ~6
         15        DO_ICALL                                                 
    8    16        DECLARE_CLASS                                            'foo'
   16    17        INIT_FCALL                                               'var_dump'
         18        NEW                                              $8      'Foo'
         19        DO_FCALL                                      0          
         20        TYPE_CHECK                                  128  ~10     $8
         21        SEND_VAL                                                 ~10
         22        DO_ICALL                                                 
         23      > RETURN                                                   1

Class Foo:
Function count:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LqmvK
function name:  count
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E > > RETURN                                                   4
   13     1*     > RETURN                                                   null

End of function count

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.02 ms | 1395 KiB | 15 Q