3v4l.org

run code in 300+ PHP versions simultaneously
<?php class C { public $x = 1; function __construct() { ++$this->x; } function __invoke() { return ++$this->x; } function __toString() { return (string) --$this->x; } } $obj = new C(); echo $obj;

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.40.0170.00018.80
8.3.30.0070.00718.84
8.3.20.0050.00220.34
8.3.10.0070.00021.82
8.3.00.0060.00319.91
8.2.170.0040.01122.96
8.2.160.0050.00820.33
8.2.150.0030.00524.18
8.2.140.0000.00724.66
8.2.130.0040.00421.00
8.2.120.0000.00726.35
8.2.110.0030.00719.30
8.2.100.0060.00618.22
8.2.90.0030.00619.34
8.2.80.0050.00317.97
8.2.70.0050.00317.93
8.2.60.0000.00918.03
8.2.50.0080.00018.22
8.2.40.0040.00422.32
8.2.30.0040.00419.50
8.2.20.0050.00318.18
8.2.10.0040.00718.19
8.2.00.0070.00018.22
8.1.270.0050.00320.33
8.1.260.0050.00326.35
8.1.250.0000.00828.09
8.1.240.0060.00319.53
8.1.230.0090.00320.10
8.1.220.0000.01017.74
8.1.210.0000.00818.77
8.1.200.0050.00317.35
8.1.190.0000.00817.35
8.1.180.0030.00518.10
8.1.170.0000.00818.66
8.1.160.0040.00718.79
8.1.150.0040.00420.28
8.1.140.0070.00017.75
8.1.130.0040.00420.66
8.1.120.0040.00417.45
8.1.110.0040.00417.44
8.1.100.0040.00417.34
8.1.90.0000.00917.48
8.1.80.0080.00017.43
8.1.70.0070.00017.40
8.1.60.0050.00317.64
8.1.50.0000.00817.52
8.1.40.0000.00717.47
8.1.30.0080.00017.57
8.1.20.0060.00317.53
8.1.10.0080.00317.52
8.1.00.0060.00317.47
8.0.300.0030.00519.04
8.0.290.0000.00716.63
8.0.280.0040.00418.50
8.0.270.0000.00717.25
8.0.260.0030.00316.69
8.0.250.0000.00716.85
8.0.240.0000.00716.85
8.0.230.0030.00316.99
8.0.220.0040.00416.85
8.0.210.0030.00316.91
8.0.200.0030.00316.81
8.0.190.0100.00016.98
8.0.180.0070.00016.94
8.0.170.0000.00916.93
8.0.160.0050.00316.90
8.0.150.0000.00716.78
8.0.140.0070.00016.85
8.0.130.0050.00013.30
8.0.120.0000.00716.74
8.0.110.0000.00816.79
8.0.100.0050.00316.88
8.0.90.0000.00816.88
8.0.80.0130.00316.94
8.0.70.0000.00817.00
8.0.60.0040.00416.77
8.0.50.0040.00416.77
8.0.30.0120.00717.05
8.0.20.0130.00717.40
8.0.10.0000.00816.80
8.0.00.0100.00916.85
7.4.330.0000.00515.55
7.4.320.0040.00416.39
7.4.300.0070.00016.51
7.4.290.0030.00316.42
7.4.280.0040.00416.48
7.4.270.0060.00316.52
7.4.260.0000.00716.49
7.4.250.0040.00416.45
7.4.240.0040.00416.61
7.4.230.0040.00416.71
7.4.220.0070.00016.46
7.4.210.0120.00316.62
7.4.200.0070.00016.70
7.4.160.0120.00816.48
7.4.150.0230.00317.40
7.4.140.0100.01017.86
7.4.130.0080.01616.55
7.4.120.0120.00916.35
7.4.110.0100.01016.41
7.4.100.0120.00816.49
7.4.90.0030.01616.48
7.4.80.0120.01019.39
7.4.70.0100.01316.54
7.4.60.0120.00416.42
7.4.50.0000.01516.54
7.4.40.0130.00316.57
7.4.00.0030.01015.02
7.3.330.0060.00013.37
7.3.320.0060.00013.11
7.3.310.0040.00416.36
7.3.300.0070.00016.16
7.3.290.0120.00516.28
7.3.280.0100.00716.25
7.3.270.0110.00617.40
7.3.260.0130.00916.52
7.3.250.0130.00416.49
7.3.240.0090.00816.45
7.3.230.0090.00616.64
7.3.210.0120.00616.47
7.3.200.0060.01016.64
7.3.190.0150.00716.46
7.3.180.0110.00616.24
7.3.170.0120.00316.47
7.3.160.0030.01316.56
7.2.330.0090.00916.78
7.2.320.0030.01416.58
7.2.310.0080.00816.34
7.2.300.0050.01016.62
7.2.290.0140.00616.52
7.2.60.0030.00916.60
7.2.10.0280.00817.77
7.2.00.0230.00918.05
7.1.200.0080.00515.47
7.1.130.0220.00716.79
7.1.120.0240.01116.96
7.1.110.0220.01116.26
7.1.100.0300.01116.06
7.1.90.0280.01216.22
7.1.80.0380.00616.11
7.1.70.0250.01015.35
7.1.60.0400.01033.12
7.1.50.0480.01032.96
7.1.40.0370.01332.68
7.1.30.0410.01632.67
7.1.20.0480.01232.59
7.1.10.0300.01114.70
7.1.00.0600.01014.84

preferences:
50.85 ms | 400 KiB | 5 Q