3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo { public function __construct() {} public function add_single ( int $itemOne, int $itemTwo ) : void { echo $itemOne + $itemTwo; } public function add_Multiples ( int $itemOne, array $items ) : void { #========== COMMENT: VARIABLE(S); $intI = 0; $intCount_Selection = count( $items ) - 1; while( $intI <= $intCount_Selection ) { $temp = $this->add_single( $itemOne, (int)$items[$intI] ); $intI++; } } } $objAdder = new foo(); $objAdder->add_Single(2,3); $arrItems = array( 2, 5 ); $objAdder->add_Multiples(2, $arrItems);

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.3.60.0070.00718.31
8.3.50.0150.00317.99
8.3.40.0090.01218.85
8.3.30.0040.01118.76
8.3.20.0070.00021.90
8.3.10.0000.00721.91
8.3.00.0080.00019.76
8.2.180.0100.00725.92
8.2.170.0040.01122.96
8.2.160.0070.01421.20
8.2.150.0000.00824.18
8.2.140.0000.00824.66
8.2.130.0040.00419.39
8.2.120.0000.00826.35
8.2.110.0060.00321.06
8.2.100.0080.00417.91
8.2.90.0000.00917.77
8.2.80.0030.00618.22
8.2.70.0030.00718.05
8.2.60.0080.00017.93
8.2.50.0000.00918.22
8.2.40.0020.00520.55
8.2.30.0050.00319.20
8.2.20.0000.00818.22
8.2.10.0040.00418.13
8.2.00.0070.00018.19
8.1.280.0120.00325.92
8.1.270.0000.00822.00
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0030.00722.54
8.1.230.0080.00420.86
8.1.220.0060.00317.76
8.1.210.0060.00318.77
8.1.200.0000.00917.23
8.1.190.0000.00817.21
8.1.180.0000.00718.10
8.1.170.0030.00618.59
8.1.160.0040.00418.88
8.1.150.0070.00019.13
8.1.140.0030.00517.62
8.1.130.0030.00317.40
8.1.120.0020.00517.50
8.1.110.0000.00717.52
8.1.100.0000.00717.45
8.1.90.0040.00417.48
8.1.80.0000.01017.50
8.1.70.0000.00717.36
8.1.60.0050.00317.61
8.1.50.0080.00417.52
8.1.40.0030.00517.42
8.1.30.0040.00417.64
8.1.20.0000.00717.64
8.1.10.0000.00717.59
8.1.00.0060.00317.48
8.0.300.0070.00019.92
8.0.290.0000.00716.63
8.0.280.0000.00818.36
8.0.270.0000.00717.14
8.0.260.0030.00316.71
8.0.250.0070.00016.85
8.0.240.0040.00416.90
8.0.230.0000.00716.82
8.0.220.0030.00316.73
8.0.210.0000.00716.91
8.0.200.0030.00316.92
8.0.190.0000.00716.90
8.0.180.0000.00716.79
8.0.170.0080.00016.81
8.0.160.0040.00416.91
8.0.150.0030.00316.82
8.0.140.0040.00416.75
8.0.130.0060.00013.34
8.0.120.0000.00716.78
8.0.110.0040.00416.92
8.0.100.0020.00516.88
8.0.90.0040.00416.90
8.0.80.0060.00916.91
8.0.70.0040.00416.75
8.0.60.0040.00416.86
8.0.50.0000.00716.77
8.0.30.0040.01317.11
8.0.20.0120.00617.40
8.0.10.0000.00716.89
8.0.00.0100.00816.82
7.4.330.0000.00616.83
7.4.320.0000.00716.54
7.4.300.0050.00216.42
7.4.290.0060.00016.54
7.4.280.0000.00716.55
7.4.270.0030.00316.57
7.4.260.0030.00316.52
7.4.250.0040.00416.48
7.4.240.0030.00316.51
7.4.230.0000.00716.33
7.4.220.0040.00416.61
7.4.210.0030.01016.66
7.4.200.0030.00316.51
7.4.140.0130.00617.86
7.4.130.0100.00616.45
7.4.120.0080.01216.52
7.4.110.0100.00616.39
7.4.100.0000.01716.69
7.4.90.0100.01316.42
7.4.80.0110.01119.39
7.4.70.0120.00616.61
7.4.60.0060.01016.64
7.4.50.0060.01016.39
7.4.40.0110.00816.43
7.4.00.0000.01515.20
7.3.330.0050.00013.13
7.3.320.0020.00313.17
7.3.310.0040.00416.27
7.3.300.0040.00216.32
7.3.290.0000.00716.27
7.3.280.0070.01116.26
7.3.260.0140.00616.39
7.3.240.0120.00716.43
7.3.230.0140.00316.32
7.3.210.0060.01016.45
7.3.200.0160.00716.64
7.3.190.0090.00616.54
7.3.180.0090.01216.57
7.3.170.0080.00916.51
7.3.160.0120.00816.52
7.2.330.0060.01616.71
7.2.320.0110.01116.54
7.2.310.0040.01416.82
7.2.300.0100.00716.65
7.2.290.0080.01216.52
7.2.60.0040.00817.07
7.2.50.0090.00316.89
7.2.40.1960.01117.83
7.2.30.2730.01218.23
7.2.20.2150.01318.22
7.2.10.2490.01318.18
7.2.00.2350.01218.03
7.1.200.0100.00315.78
7.1.160.2510.01417.08
7.1.150.2340.01317.00
7.1.140.1810.01317.17
7.1.130.2340.01716.71
7.1.120.1870.01316.70
7.1.110.1990.00916.39
7.1.100.2610.01616.16
7.1.90.3300.01016.12
7.1.80.3010.01516.48
7.1.70.1520.01215.50
7.1.60.1440.01633.32
7.1.50.1460.01932.99
7.1.40.1480.01432.63
7.1.30.1510.01332.66
7.1.20.1710.01332.49
7.1.10.4490.01414.79
7.1.00.0150.00715.00

preferences:
31.97 ms | 400 KiB | 5 Q