3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Point { public function __construct(public int $x, public int $y) {} } $p1 = new Point(10, 2); $p2 = new Point(0, 0); $p3 = new Point(5, 5); $result = min($p3, max($p2, $p1)); var_dump($result);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pTmiV
function name:  (null)
number of ops:  28
compiled vars:  !0 = $p1, !1 = $p2, !2 = $p3, !3 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   NEW                                              $4      'Point'
          1        SEND_VAL_EX                                              10
          2        SEND_VAL_EX                                              2
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $4
    6     5        NEW                                              $7      'Point'
          6        SEND_VAL_EX                                              0
          7        SEND_VAL_EX                                              0
          8        DO_FCALL                                      0          
          9        ASSIGN                                                   !1, $7
    7    10        NEW                                              $10     'Point'
         11        SEND_VAL_EX                                              5
         12        SEND_VAL_EX                                              5
         13        DO_FCALL                                      0          
         14        ASSIGN                                                   !2, $10
   10    15        INIT_FCALL                                               'min'
         16        SEND_VAR                                                 !2
         17        INIT_FCALL                                               'max'
         18        SEND_VAR                                                 !1
         19        SEND_VAR                                                 !0
         20        DO_ICALL                                         $13     
         21        SEND_VAR                                                 $13
         22        DO_ICALL                                         $14     
         23        ASSIGN                                                   !3, $14
   12    24        INIT_FCALL                                               'var_dump'
         25        SEND_VAR                                                 !3
         26        DO_ICALL                                                 
         27      > RETURN                                                   1

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

End of function __construct

End of class Point.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.82 ms | 1001 KiB | 16 Q