3v4l.org

run code in 300+ PHP versions simultaneously
<?php $emptyit = new EmptyIterator; echo 'count($emptyit): ', count($emptyit), "\n"; // obj w/no properties not empty PHP5+ echo '$emptyit->count(): ', $emptyit->count(), "\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CVOHk
function name:  (null)
number of ops:  13
compiled vars:  !0 = $emptyit
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $1      'EmptyIterator'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
    3     3        ECHO                                                     'count%28%24emptyit%29%3A+'
          4        COUNT                                            ~4      !0
          5        ECHO                                                     ~4
          6        ECHO                                                     '%0A'
    4     7        ECHO                                                     '%24emptyit-%3Ecount%28%29%3A+'
          8        INIT_METHOD_CALL                                         !0, 'count'
          9        DO_FCALL                                      0  $5      
         10        ECHO                                                     $5
         11        ECHO                                                     '%0A'
         12      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.81 ms | 1393 KiB | 13 Q