3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { private $testy; function __construct($input) { $this->testy = $input; } public function doSomething() { return $this->testy * mt_rand(); } } $obj = new Test(1); echo $obj->doSomething();

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)
7.3.10.0070.01116.38
7.3.00.0160.00816.57
7.2.130.0080.00616.82
7.2.120.0090.00916.77
7.2.110.0130.00316.69
7.2.100.0090.00616.99
7.2.90.0110.00416.75
7.2.80.0130.01616.41
7.2.70.0080.00616.49
7.2.60.0030.01216.68
7.2.50.0030.01016.62
7.2.40.0030.01316.60
7.2.30.0070.01017.11
7.2.20.0090.00316.76
7.2.10.0070.01016.61
7.2.00.0060.00817.96
7.1.250.0130.00415.49
7.1.70.0000.00817.03
7.1.60.0120.01217.22
7.1.50.0040.00716.63
7.1.40.0110.01116.27
7.1.30.0030.00816.79
7.1.20.0030.01316.56
7.1.10.0000.01216.55
7.1.00.0040.00416.55
7.0.200.0000.00916.75
7.0.190.0030.00616.91
7.0.180.0000.00716.27
7.0.170.0040.00416.46
7.0.160.0070.00316.41
7.0.150.0000.00816.39
7.0.140.0000.00916.27
7.0.130.0040.00716.63
7.0.120.0080.00016.52
7.0.110.0000.00916.33
7.0.100.0030.00616.48
7.0.90.0040.00716.50
7.0.80.0030.00616.20
7.0.70.0050.00516.37
7.0.60.0030.00816.20
7.0.50.0000.00716.15
7.0.40.0000.00815.23
7.0.30.0020.00515.23
7.0.20.0030.00515.23
7.0.10.0040.00415.23
7.0.00.0040.00415.23
5.6.300.0040.04220.83
5.6.290.0000.04420.80
5.6.280.0000.04320.88
5.6.270.0070.03720.91
5.6.260.0030.04621.08
5.6.250.0070.04021.09
5.6.240.0030.04621.00
5.6.230.0100.04820.89
5.6.220.0030.05520.96
5.6.210.0030.03920.94
5.6.200.0040.04920.87
5.6.190.0000.05120.83
5.6.180.0070.04521.07
5.6.170.0030.04320.78
5.6.160.0000.04321.04
5.6.150.0070.04721.05
5.6.140.0100.03620.95
5.6.130.0030.04920.77
5.6.120.0000.04420.91
5.6.110.0070.04021.03
5.6.100.0070.04020.92
5.6.90.0000.04420.92
5.6.80.0030.03720.13
5.6.70.0030.06820.14
5.6.60.0060.03520.23
5.6.50.0070.04320.13
5.6.40.0000.08520.17
5.6.30.0030.04620.19
5.6.20.0070.03720.09
5.6.10.0070.06320.19
5.6.00.0000.04520.39
5.5.380.0070.06517.63
5.5.370.0030.04217.49
5.5.360.0060.03917.55
5.5.350.0070.03817.53
5.5.340.0000.04518.00
5.5.330.0100.03518.13
5.5.320.0000.04518.04
5.5.310.0060.03817.71
5.5.300.0000.04418.06
5.5.290.0000.04718.00
5.5.280.0000.04818.06
5.5.270.0060.03917.82
5.5.260.0030.04117.69
5.5.250.0030.04117.51
5.5.240.0000.04117.13
5.5.230.0000.04317.46
5.5.220.0030.06317.23
5.5.210.0170.04317.10
5.5.200.0000.04117.21
5.5.190.0000.04617.21
5.5.180.0100.07017.05
5.5.160.0000.04317.35
5.5.150.0030.03917.52
5.5.140.0000.05717.45
5.5.130.0000.04117.38
5.5.120.0000.04717.46
5.5.110.0000.04117.18
5.5.100.0030.03817.34
5.5.90.0000.04416.97
5.5.80.0000.04417.29
5.5.70.0070.04616.98
5.5.60.0040.06117.11
5.5.50.0030.03717.24
5.5.40.0220.03217.10
5.5.30.0090.03117.10
5.5.20.0030.06017.27
5.5.10.0070.05417.07
5.5.00.0030.04217.32
5.4.450.0000.04419.51
5.4.440.0070.04219.25
5.4.430.0120.03119.23
5.4.420.0070.04419.37
5.4.410.0030.03719.24
5.4.400.0000.04519.17
5.4.390.0000.04418.93
5.4.380.0070.03718.99
5.4.370.0030.03919.03
5.4.360.0030.03718.93
5.4.350.0000.05918.93
5.4.340.0040.05019.15
5.4.320.0030.04218.93
5.4.310.0030.03919.07
5.4.300.0030.04518.92
5.4.290.0000.04319.00
5.4.280.0100.07018.89
5.4.270.0000.04418.91
5.4.260.0100.03319.00
5.4.250.0030.03719.02
5.4.240.0030.03719.14
5.4.230.0070.03419.04
5.4.220.0000.05119.00
5.4.210.0100.03918.89
5.4.200.0030.03818.99
5.4.190.0210.04819.20
5.4.180.0060.03818.91
5.4.170.0030.04819.00
5.4.160.0030.06618.98
5.4.150.0090.03418.96
5.4.140.0040.03616.70
5.4.130.0000.07116.75
5.4.120.0030.03516.51
5.4.110.0000.04216.55
5.4.100.0040.03516.60
5.4.90.0030.03416.59
5.4.80.0170.03516.70
5.4.70.0000.04416.68
5.4.60.0100.04716.32
5.4.50.0000.04416.33
5.4.40.0040.03916.59
5.4.30.0000.04216.64
5.4.20.0000.03716.59
5.4.10.0030.03716.57
5.4.00.0030.03316.04
5.3.290.0000.06215.23
5.3.280.0030.03915.23
5.3.270.0040.03915.23
5.3.260.0030.04115.23
5.3.250.0100.04015.23
5.3.240.0170.04015.23
5.3.230.0100.03615.23
5.3.220.0090.03415.23
5.3.210.0000.04315.23
5.3.200.0100.02915.23
5.3.190.0040.03915.23
5.3.180.0000.04215.23
5.3.170.0030.03715.23
5.3.160.0030.03815.23
5.3.150.0000.04715.23
5.3.140.0060.03715.23
5.3.130.0040.04015.23
5.3.120.0000.04515.23
5.3.110.0000.04015.23
5.3.100.0030.03815.23
5.3.90.0000.04315.23
5.3.80.0220.03215.23
5.3.70.0030.03415.23
5.3.60.0030.07715.23
5.3.50.0070.04915.23
5.3.40.0000.04115.23
5.3.30.0060.03115.23
5.3.20.0030.03415.23
5.3.10.0030.03615.23
5.3.00.0000.04615.23
5.2.170.0040.04215.23
5.2.160.0000.03515.23
5.2.150.0030.03315.23
5.2.140.0000.03515.23
5.2.130.0000.03115.23
5.2.120.0030.03615.23
5.2.110.0060.02515.23
5.2.100.0060.03515.23
5.2.90.0060.03515.23
5.2.80.0070.03715.23
5.2.70.0030.02715.23
5.2.60.0030.03015.23
5.2.50.0000.03215.23
5.2.40.0030.02715.23
5.2.30.0030.03015.23
5.2.20.0000.03415.23
5.2.10.0000.03115.23
5.2.00.0060.02815.23
5.1.60.0030.02415.23
5.1.50.0030.02715.23
5.1.40.0070.02015.23
5.1.30.0000.03715.23
5.1.20.0000.03115.23
5.1.10.0030.02415.23
5.1.00.0000.02915.23
5.0.50.0000.02215.23
5.0.40.0000.02215.23
5.0.30.0030.03215.23
5.0.20.0060.01615.23
5.0.10.0030.01815.23
5.0.00.0030.02815.23
4.4.90.0000.01815.23
4.4.80.0030.01315.23
4.4.70.0030.01315.23
4.4.60.0000.01615.23
4.4.50.0030.01515.23
4.4.40.0000.02815.23
4.4.30.0040.01515.23
4.4.20.0030.01415.23
4.4.10.0000.01815.23
4.4.00.0000.02715.23
4.3.110.0030.01415.23
4.3.100.0030.01415.23
4.3.90.0000.01815.23
4.3.80.0000.02915.23
4.3.70.0060.01415.23
4.3.60.0040.01415.23
4.3.50.0030.01615.23
4.3.40.0040.02115.23
4.3.30.0000.01815.23
4.3.20.0040.01415.23
4.3.10.0030.01715.23
4.3.00.0030.01715.23

preferences:
37.8 ms | 401 KiB | 5 Q