3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.02 ms | 1395 KiB | 15 Q