3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test{} function returnTest(){return 'Test';} var_dump(new ${!${''} = 'Test'}); // string literal name works var_dump(new ${!${''} = returnTest()}); // function return value works var_dump(new ${!${''} = (new class() { // method invokation from anonymous function expression works function returnTest() : string{return 'Test';} })->returnTest()});

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.0180.00316.63
8.3.50.0110.00716.75
8.3.40.0110.00718.85
8.3.30.0120.00318.47
8.3.20.0040.00420.07
8.3.10.0000.00721.90
8.3.00.0090.00021.77
8.2.180.0070.01416.50
8.2.170.0080.00822.96
8.2.160.0140.00320.43
8.2.150.0000.00824.18
8.2.140.0070.00024.66
8.2.130.0050.00221.11
8.2.120.0000.00726.35
8.2.110.0050.00519.30
8.2.100.0080.00417.80
8.2.90.0000.00819.05
8.2.80.0030.00617.97
8.2.70.0040.00417.75
8.2.60.0000.00818.03
8.2.50.0050.00318.09
8.2.40.0000.00922.32
8.2.30.0000.00819.31
8.2.20.0040.00417.69
8.2.10.0000.00818.04
8.2.00.0070.00018.10
8.1.280.0150.00325.92
8.1.270.0030.00522.07
8.1.260.0070.00728.09
8.1.250.0030.00528.09
8.1.240.0070.01122.51
8.1.230.0080.00317.70
8.1.220.0050.00317.74
8.1.210.0000.00818.77
8.1.200.0030.00617.00
8.1.190.0040.00417.22
8.1.180.0040.00418.10
8.1.170.0030.00618.34
8.1.160.0040.00420.67
8.1.150.0040.00418.92
8.1.140.0080.00019.48
8.1.130.0040.00417.69
8.1.120.0070.00017.38
8.1.110.0030.00317.48
8.1.100.0000.00817.33
8.1.90.0040.00417.52
8.1.80.0040.00417.35
8.1.70.0060.00317.49
8.1.60.0060.00317.46
8.1.50.0040.00417.51
8.1.40.0000.00817.40
8.1.30.0030.00517.64
8.1.20.0050.00217.59
8.1.10.0060.00317.60
8.1.00.0060.00317.52
8.0.300.0030.00618.77
8.0.290.0040.00416.88
8.0.280.0000.00718.45
8.0.270.0070.00017.20
8.0.260.0030.00317.18
8.0.250.0000.00716.96
8.0.240.0000.00817.02
8.0.230.0030.00316.94
8.0.220.0070.00016.86
8.0.210.0070.00016.87
8.0.200.0000.00616.89
8.0.190.0050.00216.94
8.0.180.0040.00416.80
8.0.170.0050.00216.88
8.0.160.0000.00716.93
8.0.150.0070.00016.85
8.0.140.0060.00316.78
8.0.130.0030.00313.39
8.0.120.0000.00716.77
8.0.110.0080.00016.79
8.0.100.0000.00716.87
8.0.90.0030.00316.91
8.0.80.0080.00616.90
8.0.70.0040.00416.75
8.0.60.0040.00416.68
8.0.50.0030.00516.71
8.0.30.0100.00717.01
8.0.20.0110.00817.40
8.0.10.0080.00016.82
8.0.00.0070.01016.76
7.4.330.0030.00316.77
7.4.320.0070.00016.50
7.4.300.0080.00016.60
7.4.290.0000.00716.46
7.4.280.0030.00516.60
7.4.270.0000.00716.57
7.4.260.0030.00316.60
7.4.250.0070.00016.57
7.4.240.0000.00716.53
7.4.230.0030.00516.62
7.4.220.0070.01316.68
7.4.210.0070.00716.52
7.4.200.0030.00316.61
7.4.160.0130.00716.49
7.4.150.0090.00917.40
7.4.140.0170.00717.86
7.4.130.0110.00716.47
7.4.120.0100.00716.53
7.4.110.0090.00916.47
7.4.100.0130.00316.43
7.4.90.0070.01716.50
7.4.80.0110.00719.39
7.4.70.0030.01316.45
7.4.60.0130.00616.32
7.4.50.0030.01416.55
7.4.40.0080.01516.35
7.4.30.0090.01516.57
7.4.00.0030.00915.14
7.3.330.0000.00713.17
7.3.320.0000.00613.17
7.3.310.0030.00316.30
7.3.300.0000.00716.32
7.3.290.0080.01016.29
7.3.280.0050.01216.30
7.3.270.0110.00517.40
7.3.260.0090.00916.25
7.3.250.0070.01016.29
7.3.240.0130.00616.58
7.3.230.0170.00316.50
7.3.210.0060.01316.54
7.3.200.0080.00819.39
7.3.190.0080.00816.48
7.3.180.0090.00916.47
7.3.170.0080.00816.39
7.3.160.0170.00016.46
7.2.330.0130.00316.38
7.2.320.0030.02216.57
7.2.310.0040.01416.34
7.2.300.0050.01116.70
7.2.290.0060.00916.83
7.2.60.0100.00317.01
7.2.00.0040.00819.28
7.1.200.0070.00715.71
7.1.100.0000.01018.11
7.1.70.0000.00717.21
7.1.60.0120.01219.40
7.1.50.0030.01416.57
7.1.00.0100.07022.45
7.0.200.0470.01014.74
7.0.60.0100.04321.71
7.0.50.0200.04317.85
7.0.40.0070.06720.21
7.0.30.0300.04320.25
7.0.20.0400.08020.12
7.0.10.0070.04320.20
7.0.00.0070.08320.32
5.6.280.0000.04320.82
5.6.210.0200.07320.62
5.6.200.0070.07318.24
5.6.190.0070.09320.28
5.6.180.0100.04720.48
5.6.170.0230.08020.50
5.6.160.0030.04320.44
5.6.150.0070.04718.23
5.6.140.0070.03718.28
5.6.130.0100.04318.17
5.6.120.0030.09321.03
5.6.110.0170.06321.04
5.6.100.0170.07321.07
5.6.90.0030.08720.96
5.6.80.0070.08020.54
5.5.350.0130.07720.32
5.5.340.0030.05718.07
5.5.330.0100.05720.47
5.5.320.0630.07320.51
5.5.310.0230.07020.42
5.5.300.0070.03718.07
5.5.290.0100.04718.07
5.5.280.0230.06720.96
5.5.270.0030.04320.86
5.5.260.0200.06320.97
5.5.250.0200.04720.78
5.5.240.0100.08020.22

preferences:
45.19 ms | 400 KiB | 5 Q