3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MultiImageComponent { public $imgs = []; public function __construct() { foreach(func_get_args() as $url) { $this->imgs[] = new Image($url); } } } class Image { private $url = ''; public function __construct($url) { $this->url = $url; } public function getUrl() { return $this->url; } } $mic = new MultiImageCompnent("https://photos.smugmug.com/Comics/Pa-comics/n-xmQS5/i-RZcDzzK/0/2100x20000/i-RZcDzzK-2100x20000.jpg", "http://www.acq-inc.com/assets/ai/img/img_staff.gif", "https://a.fsdn.com/sd/topics/business_64.png");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SWrSR
function name:  (null)
number of ops:  7
compiled vars:  !0 = $mic
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   NEW                                              $1      'MultiImageCompnent'
          1        SEND_VAL_EX                                              'https%3A%2F%2Fphotos.smugmug.com%2FComics%2FPa-comics%2Fn-xmQS5%2Fi-RZcDzzK%2F0%2F2100x20000%2Fi-RZcDzzK-2100x20000.jpg'
          2        SEND_VAL_EX                                              'http%3A%2F%2Fwww.acq-inc.com%2Fassets%2Fai%2Fimg%2Fimg_staff.gif'
          3        SEND_VAL_EX                                              'https%3A%2F%2Fa.fsdn.com%2Fsd%2Ftopics%2Fbusiness_64.png'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $1
          6      > RETURN                                                   1

Class MultiImageComponent:
Function __construct:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 10
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 10
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
filename:       /in/SWrSR
function name:  __construct
number of ops:  12
compiled vars:  !0 = $url
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   FUNC_GET_ARGS                                    ~1      
          1      > FE_RESET_R                                       $2      ~1, ->10
          2    > > FE_FETCH_R                                               $2, !0, ->10
    7     3    >   NEW                                              $5      'Image'
          4        SEND_VAR_EX                                              !0
          5        DO_FCALL                                      0          
          6        FETCH_OBJ_W                                      $3      'imgs'
          7        ASSIGN_DIM                                               $3
          8        OP_DATA                                                  $5
    6     9      > JMP                                                      ->2
         10    >   FE_FREE                                                  $2
    9    11      > RETURN                                                   null

End of function __construct

End of class MultiImageComponent.

Class Image:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SWrSR
function name:  __construct
number of ops:  4
compiled vars:  !0 = $url
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   RECV                                             !0      
   16     1        ASSIGN_OBJ                                               'url'
          2        OP_DATA                                                  !0
   17     3      > RETURN                                                   null

End of function __construct

Function geturl:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SWrSR
function name:  getUrl
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   FETCH_OBJ_R                                      ~0      'url'
          1      > RETURN                                                   ~0
   21     2*     > RETURN                                                   null

End of function geturl

End of class Image.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.33 ms | 1399 KiB | 13 Q