3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Bar{ public $state = "valid"; function baz($inject){ $this->state = "invalid"; $inject->qux(); $this->state = "valid"; } } $x = new Bar(); $x->baz(new class($x){ function __construct($x){ $this->x = $x; } function qux(){ echo $this->x->state . " pwned!"; } });

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.5.30.0090.00820.78
8.5.20.0110.00919.63
8.5.10.0110.00816.70
8.5.00.0120.00920.05
8.4.180.0120.00925.72
8.4.170.0110.01123.82
8.4.160.0110.00923.92
8.4.150.0070.00616.93
8.4.140.0140.00717.52
8.4.130.0100.01117.82
8.4.120.0110.00919.63
8.4.110.0120.00819.93
8.4.100.0110.00918.18
8.4.90.0090.01020.66
8.4.80.0110.01018.98
8.4.70.0120.00820.64
8.4.60.0090.00922.49
8.4.50.0100.01118.51
8.4.40.0180.00419.61
8.4.30.0100.01017.87
8.4.20.0120.00617.62
8.4.10.0090.00019.83
8.3.300.0100.01120.78
8.3.290.0090.01120.72
8.3.280.0130.00918.35
8.3.270.0090.01116.53
8.3.260.0080.00716.59
8.3.250.0140.00516.66
8.3.240.0110.00616.69
8.3.230.0150.00416.77
8.3.220.0110.00619.15
8.3.210.0090.00916.80
8.3.200.0070.00216.93
8.3.190.0050.01217.24
8.3.180.0040.00319.08
8.3.170.0090.00917.13
8.3.160.0000.01016.78
8.3.150.0130.00016.73
8.3.140.0000.00816.94
8.3.130.0080.00018.80
8.3.120.0040.00419.06
8.3.110.0000.00916.65
8.3.100.0120.00316.91
8.3.90.0100.00518.55
8.3.80.0100.00018.43
8.3.70.0080.00816.75
8.3.60.0150.00618.55
8.3.50.0110.00417.59
8.3.40.0110.00418.97
8.3.30.0070.00718.84
8.3.20.0080.00020.57
8.3.10.0080.00023.48
8.3.00.0030.00523.48
8.2.300.0100.01218.25
8.2.290.0110.00816.50
8.2.280.0030.00618.61
8.2.270.0090.00016.79
8.2.260.0120.00317.01
8.2.250.0090.00616.84
8.2.240.0080.00018.36
8.2.230.0000.00820.94
8.2.220.0100.00024.06
8.2.210.0030.00726.77
8.2.200.0090.00018.16
8.2.190.0140.00416.58
8.2.180.0070.01018.41
8.2.170.0210.00022.96
8.2.160.0100.00719.07
8.2.150.0050.00324.18
8.2.140.0050.00324.66
8.2.130.0040.00419.30
8.2.120.0040.00426.35
8.2.110.0030.00620.92
8.2.100.0090.00317.91
8.2.90.0000.00818.92
8.2.80.0000.00817.97
8.2.70.0030.00619.23
8.2.60.0000.00818.03
8.2.50.0040.00418.22
8.2.40.0020.00520.65
8.2.30.0040.00419.13
8.2.20.0080.00018.02
8.2.10.0040.00417.97
8.2.00.0040.00418.17
8.1.340.0150.00819.92
8.1.330.0110.00916.10
8.1.320.0110.00817.86
8.1.310.0140.00318.56
8.1.300.0060.00317.67
8.1.290.0090.00018.88
8.1.280.0110.00425.92
8.1.270.0050.00522.12
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0100.00022.52
8.1.230.0000.01117.83
8.1.220.0040.00417.74
8.1.210.0060.00318.77
8.1.200.0040.00417.38
8.1.190.0090.00017.36
8.1.180.0000.00718.10
8.1.170.0090.00018.57
8.1.160.0040.00418.86
8.1.150.0070.00018.80
8.1.140.0040.00419.09
8.1.130.0050.00317.59
8.1.120.0000.00717.49
8.1.110.0030.00517.42
8.1.100.0070.00017.41
8.1.90.0000.00817.46
8.1.80.0040.00417.45
8.1.70.0040.00417.37
8.1.60.0040.00417.49
8.1.50.0040.00417.42
8.1.40.0000.00717.49
8.1.30.0000.00817.63
8.1.20.0040.00417.67
8.1.10.0000.00817.47
8.1.00.0030.00517.53
8.0.300.0000.00718.85
8.0.290.0060.00316.75
8.0.280.0030.00318.46
8.0.270.0000.00717.27
8.0.260.0040.00417.38
8.0.250.0070.00017.00
8.0.240.0030.00616.84
8.0.230.0050.00216.95
8.0.220.0070.00016.80
8.0.210.0040.00416.80
8.0.200.0030.00317.00
8.0.190.0030.00616.98
8.0.180.0000.00716.94
8.0.170.0040.00416.89
8.0.160.0090.00016.82
8.0.150.0040.00416.88
8.0.140.0030.00516.87
8.0.130.0000.00513.30
8.0.120.0000.00716.77
8.0.110.0040.00416.86
8.0.100.0070.00016.80
8.0.90.0040.00416.93
8.0.80.0100.01016.86
8.0.70.0000.00716.79
8.0.60.0050.00317.01
8.0.50.0000.00816.90
8.0.30.0100.00917.07
8.0.20.0090.01117.40
8.0.10.0040.00416.89
8.0.00.0110.01016.90
7.4.330.0060.00016.59
7.4.320.0000.00716.47
7.4.300.0000.00916.55
7.4.290.0000.00716.55
7.4.280.0000.01016.60
7.4.270.0080.00016.64
7.4.260.0070.00016.39
7.4.250.0040.00416.59
7.4.240.0030.00316.51
7.4.230.0000.00716.50
7.4.220.0060.00316.59
7.4.210.0030.01316.55
7.4.200.0030.00316.44
7.4.160.0100.00616.50
7.4.150.0110.00717.40
7.4.140.0120.00817.86
7.4.130.0130.00416.46
7.4.120.0090.01016.53
7.4.110.0060.00916.54
7.4.100.0120.00916.46
7.4.90.0100.00716.29
7.4.80.0180.00619.39
7.4.70.0110.00616.66
7.4.60.0090.00616.66
7.4.50.0100.00716.41
7.4.40.0080.00816.74
7.4.00.0080.00915.07
7.3.330.0030.00313.17
7.3.320.0000.00513.23
7.3.310.0000.00716.17
7.3.300.0030.00316.26
7.3.290.0080.00716.26
7.3.280.0120.00216.22
7.3.270.0120.00617.40
7.3.260.0100.00816.34
7.3.250.0120.00516.45
7.3.240.0070.01116.45
7.3.230.0080.01616.21
7.3.210.0040.01616.57
7.3.200.0050.01316.18
7.3.190.0110.00716.56
7.3.180.0150.00616.40
7.3.170.0120.00416.65
7.3.160.0110.01116.50
7.3.120.0070.01014.88
7.3.110.0060.01014.93
7.3.100.0050.00814.77
7.3.90.0050.00814.75
7.3.80.0090.00714.58
7.3.70.0040.00914.74
7.3.60.0050.00814.63
7.3.50.0070.00714.70
7.3.40.0040.01114.68
7.3.30.0040.00814.71
7.3.20.0030.01016.74
7.3.10.0050.00716.69
7.3.00.0060.00916.45
7.2.330.0100.01016.87
7.2.320.0080.00816.51
7.2.310.0060.01516.67
7.2.300.0090.01316.82
7.2.290.0070.01116.59
7.2.250.0090.01015.06
7.2.240.0110.00815.13
7.2.230.0040.01015.27
7.2.220.0020.01315.07
7.2.210.0100.00615.17
7.2.200.0080.00515.07
7.2.190.0110.00314.82
7.2.180.0030.01415.04
7.2.170.0050.00815.04
7.2.130.0120.00217.03
7.2.120.0050.00716.88
7.2.110.0110.00516.88
7.2.100.0040.00616.78
7.2.90.0060.00617.05
7.2.80.0060.00616.85
7.2.70.0030.01016.94
7.2.60.0070.00416.95
7.2.50.0040.00616.96
7.2.40.0090.00516.81
7.2.30.0100.00517.10
7.2.20.0060.00417.06
7.2.10.0060.00917.92
7.2.00.0050.00917.84
7.1.330.0080.00615.75
7.1.320.0050.00715.75
7.1.310.0080.00615.86
7.1.300.0070.00515.67
7.1.290.0070.01015.72
7.1.280.0050.00615.75
7.1.270.0040.01015.70
7.1.260.0090.00215.85
7.1.250.0060.00515.65
7.1.240.0050.00315.83
7.1.230.0070.01015.70
7.1.220.0080.00415.87
7.1.210.0040.01115.83
7.1.200.0050.00715.77
7.1.190.0100.00715.79
7.1.180.0060.00315.82
7.1.170.0090.00315.81
7.1.160.0070.00715.80
7.1.150.0000.01315.92
7.1.140.0030.01315.86
7.1.130.0060.00615.79
7.1.120.0090.00617.17
7.1.110.0110.00516.80
7.1.100.0090.00716.72
7.1.90.0070.00716.89
7.1.80.0040.01116.84
7.1.70.0020.01216.28
7.1.60.0080.01225.32
7.1.50.0140.00525.11
7.1.40.0080.01125.16
7.1.30.0110.01224.98
7.1.20.0110.00825.14
7.1.10.0100.00416.18
7.1.00.0030.01216.16
7.0.330.0110.00415.24
5.6.380.0030.01014.08

preferences:
46.41 ms | 1620 KiB | 5 Q