3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Request { private $someLongContent; public function __construct() { $this->someLongContent = str_repeat('#', 1000000); } } class Response { } class Collector { private $requests = []; private $responses = []; public function addRequest(Request $request) { $this->requests[] = $request; } public function addResponse(Response $response) { $this->responses[] = $response; } } $collector = new Collector(); $collector->addRequest(new Request()); $collector->addRequest(new Request()); $collector->addRequest(new Request()); $collector->addRequest(new Request()); $collector->addResponse(new Response()); $collector->addResponse(new Response()); $collector->addResponse(new Response()); $collector->addResponse(new Response()); register_shutdown_function(function () use ($collector) { echo 'do stuff'; }); str_repeat('#', PHP_INT_MAX);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1cY3i
function name:  (null)
number of ops:  53
compiled vars:  !0 = $collector
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   27     0  E >   NEW                                              $1      'Collector'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   28     3        INIT_METHOD_CALL                                         !0, 'addRequest'
          4        NEW                                              $4      'Request'
          5        DO_FCALL                                      0          
          6        SEND_VAR_NO_REF_EX                                       $4
          7        DO_FCALL                                      0          
   29     8        INIT_METHOD_CALL                                         !0, 'addRequest'
          9        NEW                                              $7      'Request'
         10        DO_FCALL                                      0          
         11        SEND_VAR_NO_REF_EX                                       $7
         12        DO_FCALL                                      0          
   30    13        INIT_METHOD_CALL                                         !0, 'addRequest'
         14        NEW                                              $10     'Request'
         15        DO_FCALL                                      0          
         16        SEND_VAR_NO_REF_EX                                       $10
         17        DO_FCALL                                      0          
   31    18        INIT_METHOD_CALL                                         !0, 'addRequest'
         19        NEW                                              $13     'Request'
         20        DO_FCALL                                      0          
         21        SEND_VAR_NO_REF_EX                                       $13
         22        DO_FCALL                                      0          
   33    23        INIT_METHOD_CALL                                         !0, 'addResponse'
         24        NEW                                              $16     'Response'
         25        DO_FCALL                                      0          
         26        SEND_VAR_NO_REF_EX                                       $16
         27        DO_FCALL                                      0          
   34    28        INIT_METHOD_CALL                                         !0, 'addResponse'
         29        NEW                                              $19     'Response'
         30        DO_FCALL                                      0          
         31        SEND_VAR_NO_REF_EX                                       $19
         32        DO_FCALL                                      0          
   35    33        INIT_METHOD_CALL                                         !0, 'addResponse'
         34        NEW                                              $22     'Response'
         35        DO_FCALL                                      0          
         36        SEND_VAR_NO_REF_EX                                       $22
         37        DO_FCALL                                      0          
   36    38        INIT_METHOD_CALL                                         !0, 'addResponse'
         39        NEW                                              $25     'Response'
         40        DO_FCALL                                      0          
         41        SEND_VAR_NO_REF_EX                                       $25
         42        DO_FCALL                                      0          
   38    43        INIT_FCALL                                               'register_shutdown_function'
         44        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F1cY3i%3A38%240'
         45        BIND_LEXICAL                                             ~28, !0
   40    46        SEND_VAL                                                 ~28
         47        DO_ICALL                                                 
   42    48        INIT_FCALL                                               'str_repeat'
         49        SEND_VAL                                                 '%23'
         50        SEND_VAL                                                 9223372036854775807
         51        DO_ICALL                                                 
         52      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2F1cY3i%3A38%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1cY3i
function name:  {closure}
number of ops:  3
compiled vars:  !0 = $collector
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   38     0  E >   BIND_STATIC                                              !0
   39     1        ECHO                                                     'do+stuff'
   40     2      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F1cY3i%3A38%240

Class Request:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1cY3i
function name:  __construct
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                               'str_repeat'
          1        SEND_VAL                                                 '%23'
          2        SEND_VAL                                                 1000000
          3        DO_ICALL                                         $1      
          4        ASSIGN_OBJ                                               'someLongContent'
          5        OP_DATA                                                  $1
    8     6      > RETURN                                                   null

End of function __construct

End of class Request.

Class Response: [no user functions]
Class Collector:
Function addrequest:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1cY3i
function name:  addRequest
number of ops:  5
compiled vars:  !0 = $request
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   RECV                                             !0      
   19     1        FETCH_OBJ_W                                      $1      'requests'
          2        ASSIGN_DIM                                               $1
          3        OP_DATA                                                  !0
   20     4      > RETURN                                                   null

End of function addrequest

Function addresponse:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1cY3i
function name:  addResponse
number of ops:  5
compiled vars:  !0 = $response
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   RECV                                             !0      
   23     1        FETCH_OBJ_W                                      $1      'responses'
          2        ASSIGN_DIM                                               $1
          3        OP_DATA                                                  !0
   24     4      > RETURN                                                   null

End of function addresponse

End of class Collector.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
190.9 ms | 1404 KiB | 17 Q