3v4l.org

run code in 300+ PHP versions simultaneously
<?php assert_options(ASSERT_ENABLED, 1); class foo { public $foo = 1; function as_string() { assert('$this->foo == 1'); } function as_expr() { assert($this->foo == 1); } } $foo = new foo(); $foo->as_expr(); $foo->as_string();

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.0140.00716.63
8.3.50.0040.01116.51
8.3.40.0140.00318.83
8.3.30.0070.00718.70
8.3.20.0070.00020.21
8.3.10.0000.00821.77
8.3.00.0050.00320.31
8.2.180.0130.01016.63
8.2.170.0120.00322.96
8.2.160.0070.00720.38
8.2.150.0000.00824.18
8.2.140.0110.00424.66
8.2.130.0000.01026.16
8.2.120.0060.00317.38
8.2.110.0040.00419.25
8.2.100.0040.00817.91
8.2.90.0080.00017.79
8.2.80.0110.00017.97
8.2.70.0090.00017.50
8.2.60.0030.00517.80
8.2.50.0030.00518.07
8.2.40.0040.00419.38
8.2.30.0040.00422.31
8.2.20.0000.00917.80
8.2.10.0070.00018.05
8.2.00.0040.00417.98
8.1.280.0070.00725.92
8.1.270.0110.00424.01
8.1.260.0070.00026.35
8.1.250.0070.00028.09
8.1.240.0070.00423.96
8.1.230.0030.00820.89
8.1.220.0030.00517.74
8.1.210.0000.00819.10
8.1.200.0040.00417.35
8.1.190.0040.00417.11
8.1.180.0040.00418.10
8.1.170.0000.00818.40
8.1.160.0000.00822.06
8.1.150.0050.00318.70
8.1.140.0030.00517.34
8.1.130.0050.00217.63
8.1.120.0000.00717.39
8.1.110.0000.00717.38
8.1.100.0000.00717.38
8.1.90.0000.00717.33
8.1.80.0000.00817.38
8.1.70.0050.00317.41
8.1.60.0030.00517.56
8.1.50.0040.00417.34
8.1.40.0040.00417.49
8.1.30.0030.00517.59
8.1.20.0050.00217.48
8.1.10.0040.00417.38
8.1.00.0040.00417.30
8.0.300.0000.00819.87
8.0.290.0070.00016.88
8.0.280.0030.00318.45
8.0.270.0070.00017.37
8.0.260.0070.00017.31
8.0.250.0080.00016.91
8.0.240.0000.00716.95
8.0.230.0000.00716.91
8.0.220.0070.00016.86
8.0.210.0070.00016.93
8.0.200.0000.00717.01
8.0.190.0040.00717.00
8.0.180.0000.00716.96
8.0.170.0000.00717.04
8.0.160.0000.00716.97
8.0.150.0030.00516.96
8.0.140.0000.00716.88
8.0.130.0060.00013.44
8.0.120.0040.00416.83
8.0.110.0040.00416.92
8.0.100.0070.00017.04
8.0.90.0000.00717.02
8.0.80.0100.01016.95
8.0.70.0070.00016.91
8.0.60.0000.00716.84
8.0.50.0050.00316.95
8.0.30.0130.00717.20
8.0.20.0130.00617.40
8.0.10.0040.00416.89
8.0.00.0120.00616.73
7.4.330.0000.00615.08
7.4.320.0000.00616.50
7.4.300.0030.00316.51
7.4.290.0000.00716.57
7.4.280.0050.00516.45
7.4.270.0030.00316.54
7.4.260.0000.00716.57
7.4.250.0040.00416.47
7.4.240.0020.00516.50
7.4.230.0040.00416.27
7.4.220.0100.00716.43
7.4.210.0090.00616.47
7.4.200.0040.00416.50
7.4.160.0130.00316.59
7.4.150.0160.00717.40
7.4.140.0110.01117.86
7.4.130.0080.00816.53
7.4.120.0070.01116.54
7.4.110.0120.01216.55
7.4.100.0140.00416.50
7.4.90.0140.00716.59
7.4.80.0060.01819.39
7.4.70.0100.00716.63
7.4.60.0080.00816.63
7.4.50.0040.00416.58
7.4.40.0070.01116.73
7.4.30.0060.01316.62
7.4.00.0050.01215.05
7.3.330.0000.00513.34
7.3.320.0050.00013.40
7.3.310.0060.00016.36
7.3.300.0070.00016.34
7.3.290.0050.00916.38
7.3.280.0120.00616.35
7.3.270.0030.01517.40
7.3.260.0030.01316.27
7.3.250.0090.00816.56
7.3.240.0030.01616.35
7.3.230.0030.01516.39
7.3.210.0140.00316.38
7.3.200.0030.01316.25
7.3.190.0000.01716.40
7.3.180.0030.01316.57
7.3.170.0000.01616.27
7.3.160.0030.01316.55
7.3.120.0100.00814.83
7.3.110.0070.01114.79
7.3.100.0070.00814.62
7.3.90.0130.00614.77
7.3.80.0050.01014.88
7.3.70.0130.00314.89
7.3.60.0060.00614.66
7.3.50.0090.00314.75
7.3.40.0090.00514.63
7.3.30.0040.01114.74
7.3.20.0040.00916.47
7.3.10.0100.00316.57
7.3.00.0050.01016.65
7.2.330.0060.01116.74
7.2.320.0090.00916.83
7.2.310.0090.01216.38
7.2.300.0200.02016.82
7.2.290.0130.01016.63
7.2.250.0040.01314.85
7.2.240.0050.01515.18
7.2.230.0070.01115.10
7.2.220.0140.00515.03
7.2.210.0080.00814.85
7.2.200.0020.01014.99
7.2.190.0080.00914.85
7.2.180.0030.01415.17
7.2.170.0090.00314.94
7.2.60.0000.01516.63
7.2.00.0110.00719.25
7.1.330.0080.00515.79
7.1.320.0060.00615.60
7.1.310.0060.00615.75
7.1.300.0050.01015.76
7.1.290.0050.01015.64
7.1.280.0030.00715.58
7.1.270.0070.00715.81
7.1.260.0040.00815.64
7.1.200.0130.00015.69
7.1.100.0060.00918.11
7.1.70.0000.00717.11
7.1.60.0060.01519.14
7.1.50.0200.01734.75
7.1.00.0070.07322.27
7.0.200.0070.00016.48
7.0.60.0070.07719.79
7.0.50.0100.08317.96
7.0.40.0070.04320.16
7.0.30.0270.04320.17
7.0.20.0330.06720.08
7.0.10.0070.09020.16
7.0.00.0100.07320.05
5.6.280.0100.06020.87
5.6.210.0000.04320.73
5.6.200.0030.08718.23
5.6.190.0130.06720.48
5.6.180.0270.07320.60
5.6.170.0200.07020.51
5.6.160.0030.06320.52
5.6.150.0030.04018.25
5.6.140.0030.04018.18
5.6.130.0030.08018.25
5.6.120.0030.04721.11
5.6.110.0100.07721.09
5.6.100.0100.07021.09
5.6.90.0100.07320.94
5.6.80.0070.06320.52
5.5.350.0000.04020.41
5.5.340.0070.07718.09
5.5.330.0070.08020.38
5.5.320.0130.08020.20
5.5.310.0270.07720.35
5.5.300.0130.07318.05
5.5.290.0030.09317.94
5.5.280.0030.05320.80
5.5.270.0030.07020.75
5.5.260.0170.04720.87
5.5.250.0030.06020.55
5.5.240.0070.08320.23
5.4.450.1100.06019.19
5.4.440.0970.06319.60
5.4.430.1000.05319.46
5.4.420.1000.05319.70
5.4.410.1000.05019.35
5.4.400.0800.06019.29
5.4.390.0930.05319.29
5.4.380.0930.05019.22
5.4.370.0930.05019.26
5.4.360.0900.05719.15
5.4.350.0900.05319.26
5.4.340.0900.05719.12
5.4.320.0970.05019.06
5.4.310.0870.05719.23
5.4.300.0900.06719.25
5.4.290.0900.05019.05
5.4.280.1100.04318.88
5.4.270.0900.05319.14
5.4.260.1000.04719.24
5.4.250.0870.05319.14
5.4.240.0900.06019.14
5.4.230.0930.04318.88
5.4.220.0970.05018.84
5.4.210.0870.06019.00
5.4.200.0800.06319.15
5.4.190.1100.04718.96
5.4.180.0970.05318.83
5.4.170.0830.05718.86
5.4.160.0830.05719.10
5.4.150.0800.06319.26
5.4.140.0830.05316.61
5.4.130.0870.05016.72
5.4.120.0970.04316.33
5.4.110.1030.05716.61
5.4.100.0830.05716.39
5.4.90.0870.05016.60
5.4.80.0900.04716.58
5.4.70.0130.06016.36
5.4.60.0030.07316.54
5.4.50.0030.03316.55
5.4.40.0200.07016.51
5.4.30.0270.05316.42
5.4.20.0230.06716.42

preferences:
45.02 ms | 400 KiB | 5 Q