3v4l.org

run code in 300+ PHP versions simultaneously
<?php class 🍏 {} class 🍉 {} class 🍍 {} class 🍌 {} class 🥗 { protected $🎁🎁 = []; public function add($🎁) { $this->🎁🎁[] = $🎁; } public function __toString() { $🎁2 = []; foreach($this->🎁🎁 as $🎁){ $🎁2[get_class($🎁)] = ($🎁2 ?? 0) + 1; } foreach($🎁2 as $🎁3 => $🎁4){ $🎁2[$🎁3] = $🎁4 . ' ' . $🎁3; } echo implode(', ', $🎁2); } } $🥗 = new 🥗(); $🥗->add(new 🍏()); $🥗->add(new 🍉()); $🥗->add(new 🍍()); $🥗->add(new 🍉()); $🥗->add(new 🍉()); $🥗->add(new 🍏()); $🥗->add(new 🍉()); $🥗->add(new 🍏()); echo $🥗;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7UGKL
function name:  (null)
number of ops:  46
compiled vars:  !0 = $🥗
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   DECLARE_CLASS                                            '%F0%9F%A5%97'
   32     1        NEW                                              $1      '%F0%9F%A5%97'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   34     4        INIT_METHOD_CALL                                         !0, 'add'
          5        NEW                                              $4      '%F0%9F%8D%8F'
          6        DO_FCALL                                      0          
          7        SEND_VAR_NO_REF_EX                                       $4
          8        DO_FCALL                                      0          
   35     9        INIT_METHOD_CALL                                         !0, 'add'
         10        NEW                                              $7      '%F0%9F%8D%89'
         11        DO_FCALL                                      0          
         12        SEND_VAR_NO_REF_EX                                       $7
         13        DO_FCALL                                      0          
   36    14        INIT_METHOD_CALL                                         !0, 'add'
         15        NEW                                              $10     '%F0%9F%8D%8D'
         16        DO_FCALL                                      0          
         17        SEND_VAR_NO_REF_EX                                       $10
         18        DO_FCALL                                      0          
   37    19        INIT_METHOD_CALL                                         !0, 'add'
         20        NEW                                              $13     '%F0%9F%8D%89'
         21        DO_FCALL                                      0          
         22        SEND_VAR_NO_REF_EX                                       $13
         23        DO_FCALL                                      0          
   38    24        INIT_METHOD_CALL                                         !0, 'add'
         25        NEW                                              $16     '%F0%9F%8D%89'
         26        DO_FCALL                                      0          
         27        SEND_VAR_NO_REF_EX                                       $16
         28        DO_FCALL                                      0          
   39    29        INIT_METHOD_CALL                                         !0, 'add'
         30        NEW                                              $19     '%F0%9F%8D%8F'
         31        DO_FCALL                                      0          
         32        SEND_VAR_NO_REF_EX                                       $19
         33        DO_FCALL                                      0          
   40    34        INIT_METHOD_CALL                                         !0, 'add'
         35        NEW                                              $22     '%F0%9F%8D%89'
         36        DO_FCALL                                      0          
         37        SEND_VAR_NO_REF_EX                                       $22
         38        DO_FCALL                                      0          
   41    39        INIT_METHOD_CALL                                         !0, 'add'
         40        NEW                                              $25     '%F0%9F%8D%8F'
         41        DO_FCALL                                      0          
         42        SEND_VAR_NO_REF_EX                                       $25
         43        DO_FCALL                                      0          
   43    44        ECHO                                                     !0
         45      > RETURN                                                   1

Class 🍏: [no user functions]
Class 🍉: [no user functions]
Class 🍍: [no user functions]
Class 🍌: [no user functions]
Class 🥗:
Function add:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7UGKL
function name:  add
number of ops:  5
compiled vars:  !0 = $🎁
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
   13     1        FETCH_OBJ_W                                      $1      '%F0%9F%8E%81%F0%9F%8E%81'
          2        ASSIGN_DIM                                               $1
          3        OP_DATA                                                  !0
   14     4      > RETURN                                                   null

End of function add

Function __tostring:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 11
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 11
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 11
2 jumps found. (Code = 77) Position 1 = 13, Position 2 = 20
Branch analysis from position: 13
2 jumps found. (Code = 78) Position 1 = 14, Position 2 = 20
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
Branch analysis from position: 11
filename:       /in/7UGKL
function name:  __toString
number of ops:  28
compiled vars:  !0 = $🎁2, !1 = $🎁, !2 = $🎁4, !3 = $🎁3
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   ASSIGN                                                   !0, <array>
   20     1        FETCH_OBJ_R                                      ~5      '%F0%9F%8E%81%F0%9F%8E%81'
          2      > FE_RESET_R                                       $6      ~5, ->11
          3    > > FE_FETCH_R                                               $6, !1, ->11
   21     4    >   GET_CLASS                                        ~7      !1
          5        COALESCE                                         ~9      !0
          6        QM_ASSIGN                                        ~9      0
          7        ADD                                              ~10     ~9, 1
          8        ASSIGN_DIM                                               !0, ~7
          9        OP_DATA                                                  ~10
   20    10      > JMP                                                      ->3
         11    >   FE_FREE                                                  $6
   24    12      > FE_RESET_R                                       $11     !0, ->20
         13    > > FE_FETCH_R                                       ~12     $11, !2, ->20
         14    >   ASSIGN                                                   !3, ~12
   25    15        CONCAT                                           ~15     !2, '+'
         16        CONCAT                                           ~16     ~15, !3
         17        ASSIGN_DIM                                               !0, !3
         18        OP_DATA                                                  ~16
   24    19      > JMP                                                      ->13
         20    >   FE_FREE                                                  $11
   28    21        INIT_FCALL                                               'implode'
         22        SEND_VAL                                                 '%2C+'
         23        SEND_VAR                                                 !0
         24        DO_ICALL                                         $17     
         25        ECHO                                                     $17
   29    26        VERIFY_RETURN_TYPE                                       
         27      > RETURN                                                   null

End of function __tostring

End of class 🥗.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.4 ms | 1409 KiB | 15 Q