3v4l.org

run code in 300+ PHP versions simultaneously
<!DOCTYPE html> <html> <body> <?php $a = array(); class testClass { public $flagName; public $message; } $a1 = new testClass(); $a1->flagname = "LTV Under 50"; $a1->message = "green"; $a[] = $a1; $a2 = new testClass(); $a2->flagname = "Blue"; $a2->message = "Yellow"; $a[] = $a2; $a = array_merge($a,(array)$a2); print_r($a); ?> </body> </html>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1JF8P
function name:  (null)
number of ops:  31
compiled vars:  !0 = $a, !1 = $a1, !2 = $a2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    1     0  E >   ECHO                                                     '%3C%21DOCTYPE+html%3E%0A%3Chtml%3E%0A%3Cbody%3E%0A%0A'
    6     1        ASSIGN                                                   !0, <array>
   12     2        NEW                                              $4      'testClass'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !1, $4
   13     5        ASSIGN_OBJ                                               !1, 'flagname'
          6        OP_DATA                                                  'LTV+Under+50'
   14     7        ASSIGN_OBJ                                               !1, 'message'
          8        OP_DATA                                                  'green'
   16     9        ASSIGN_DIM                                               !0
         10        OP_DATA                                                  !1
   18    11        NEW                                              $10     'testClass'
         12        DO_FCALL                                      0          
         13        ASSIGN                                                   !2, $10
   19    14        ASSIGN_OBJ                                               !2, 'flagname'
         15        OP_DATA                                                  'Blue'
   20    16        ASSIGN_OBJ                                               !2, 'message'
         17        OP_DATA                                                  'Yellow'
   22    18        ASSIGN_DIM                                               !0
         19        OP_DATA                                                  !2
   24    20        INIT_FCALL                                               'array_merge'
         21        SEND_VAR                                                 !0
         22        CAST                                          7  ~16     !2
         23        SEND_VAL                                                 ~16
         24        DO_ICALL                                         $17     
         25        ASSIGN                                                   !0, $17
   25    26        INIT_FCALL                                               'print_r'
         27        SEND_VAR                                                 !0
         28        DO_ICALL                                                 
   30    29        ECHO                                                     '%0A%3C%2Fbody%3E%0A%3C%2Fhtml%3E'
   32    30      > RETURN                                                   1

Class testClass: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.03 ms | 1396 KiB | 17 Q