3v4l.org

run code in 300+ PHP versions simultaneously
<?php class TestClass { public function baz() { echo "Worked!"; } } $foo = 'bam'; $bam = ['bar' => new TestClass()]; $output = $$foo; var_dump($$foo); // Correctly reads this var_dump(${$foo}['bar']); // Change $$foo to $output $$foo['bar']->baz(); // function getResult() { // return "string"; // } // echo getResult(){0};

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.0070.01416.88
8.3.50.0100.01016.34
8.3.40.0110.00418.85
8.3.30.0110.00418.71
8.3.20.0080.00620.19
8.3.10.0030.00523.65
8.3.00.0060.00321.95
8.2.180.0120.00318.41
8.2.170.0090.01222.96
8.2.160.0110.00720.35
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0000.00821.05
8.2.120.0050.00326.35
8.2.110.0000.00919.45
8.2.100.0100.00318.22
8.2.90.0080.00019.21
8.2.80.0040.00417.97
8.2.70.0100.00017.63
8.2.60.0040.00417.80
8.2.50.0040.00418.09
8.2.40.0030.00620.58
8.2.30.0060.00319.44
8.2.20.0040.00417.63
8.2.10.0000.00718.13
8.2.00.0000.00718.04
8.1.280.0140.00425.92
8.1.270.0130.00722.05
8.1.260.0050.00328.09
8.1.250.0030.00328.09
8.1.240.0000.00923.97
8.1.230.0080.00421.04
8.1.220.0000.00817.74
8.1.210.0030.00718.77
8.1.200.0070.00317.00
8.1.190.0050.00317.13
8.1.180.0040.00418.10
8.1.170.0030.00518.64
8.1.160.0050.00320.79
8.1.150.0040.00420.66
8.1.140.0050.00319.54
8.1.130.0000.00717.62
8.1.120.0050.00317.48
8.1.110.0000.00717.50
8.1.100.0080.00017.48
8.1.90.0040.00417.53
8.1.80.0080.00017.39
8.1.70.0070.00017.38
8.1.60.0090.00017.53
8.1.50.0040.00417.37
8.1.40.0080.00017.53
8.1.30.0000.00817.52
8.1.20.0040.00417.57
8.1.10.0040.00417.49
8.1.00.0030.00617.45
8.0.300.0040.00418.77
8.0.290.0000.00716.63
8.0.280.0000.00718.46
8.0.270.0000.00817.34
8.0.260.0000.00717.18
8.0.250.0070.00016.88
8.0.240.0050.00317.03
8.0.230.0040.00316.86
8.0.220.0000.00716.89
8.0.210.0050.00216.97
8.0.200.0070.00016.96
8.0.190.0070.00016.98
8.0.180.0000.00716.95
8.0.170.0000.00816.91
8.0.160.0080.00016.99
8.0.150.0070.00016.86
8.0.140.0000.00816.82
8.0.130.0030.00313.38
8.0.120.0080.00016.89
8.0.110.0040.00416.93
8.0.100.0050.00316.95
8.0.90.0040.00416.86
8.0.80.0060.01016.88
8.0.70.0000.00816.90
8.0.60.0070.00016.75
8.0.50.0000.00716.96
8.0.30.0140.00517.34
8.0.20.0140.00517.40
8.0.10.0000.00716.90
8.0.00.0070.01116.86
7.4.330.0020.00216.76
7.4.320.0060.00016.38
7.4.300.0030.00616.52
7.4.290.0070.00016.61
7.4.280.0040.00416.63
7.4.270.0030.00316.50
7.4.260.0020.00516.59
7.4.250.0000.00816.57
7.4.240.0040.00416.53
7.4.230.0000.00716.41
7.4.220.0160.00316.56
7.4.210.0050.01016.59
7.4.200.0030.00316.59
7.4.160.0160.00016.68
7.4.150.0060.01017.40
7.4.140.0120.00817.86
7.4.130.0070.01416.58
7.4.120.0050.01516.40
7.4.110.0030.01316.49
7.4.100.0090.00916.58
7.4.90.0090.00916.48
7.4.80.0100.00719.39
7.4.70.0080.01016.51
7.4.60.0100.00616.56
7.4.50.0000.01416.28
7.4.40.0130.00316.43
7.4.30.0090.00916.57
7.4.10.0120.00614.85
7.4.00.0030.01215.19
7.3.330.0020.00213.18
7.3.320.0020.00313.44
7.3.310.0080.00016.33
7.3.300.0060.00016.32
7.3.290.0030.00316.31
7.3.280.0090.00816.38
7.3.270.0120.00417.40
7.3.260.0090.01516.64
7.3.250.0110.00916.38
7.3.240.0110.00616.50
7.3.230.0070.01416.57
7.3.210.0100.00716.64
7.3.200.0100.01419.39
7.3.190.0160.00716.29
7.3.180.0110.00616.38
7.3.170.0100.01016.39
7.3.160.0080.00816.45
7.3.130.0040.01114.61
7.3.120.0040.01114.96
7.3.110.0000.01715.10
7.3.100.0130.00614.72
7.3.90.0070.01014.59
7.3.80.0030.01015.06
7.3.70.0060.01014.66
7.3.60.0130.00614.88
7.3.50.0030.01014.62
7.3.40.0030.01014.90
7.3.30.0090.00614.65
7.3.20.0070.01016.68
7.3.10.0080.00416.53
7.3.00.0090.00316.62
7.2.330.0100.00716.68
7.2.320.0090.01316.43
7.2.310.0150.00916.86
7.2.300.0140.00816.73
7.2.290.0070.01016.64
7.2.260.0000.01914.96
7.2.250.0090.00915.03
7.2.240.0060.00914.98
7.2.230.0100.00614.84
7.2.220.0070.01014.57
7.2.210.0000.01614.74
7.2.200.0000.01814.98
7.2.190.0070.00715.17
7.2.180.0090.00614.84
7.2.170.0030.00615.04
7.2.160.0070.01114.98
7.2.150.0130.00316.68
7.2.140.0040.01516.58
7.2.130.0040.01416.67
7.2.120.0000.01416.94
7.2.110.0070.01016.78
7.2.100.0030.00616.88
7.2.90.0080.00316.90
7.2.80.0060.00916.67
7.2.70.0030.01316.85
7.2.60.0030.01016.83
7.2.50.0100.00716.82
7.2.40.0030.01216.77
7.2.30.0040.00816.89
7.2.20.0040.00716.79
7.2.10.0060.00616.58
7.2.00.0070.01018.29
7.1.330.0030.01015.59
7.1.320.0060.00915.85
7.1.310.0070.00715.62
7.1.300.0120.00615.86
7.1.290.0070.00715.73
7.1.280.0100.00615.85
7.1.270.0070.01115.48
7.1.260.0040.00815.82
7.1.250.0040.01115.57
7.1.240.0060.01016.00
7.1.230.0000.00915.62
7.1.220.0000.01515.74
7.1.210.0090.00315.80
7.1.200.0100.00515.68
7.1.190.0000.00915.62
7.1.180.0070.00715.76
7.1.170.0060.00815.75
7.1.160.0100.00715.43
7.1.150.0030.00915.90
7.1.140.0060.00915.56
7.1.130.0000.01815.58
7.1.120.0000.01615.73
7.1.110.0060.00615.68
7.1.100.0020.01116.96
7.1.90.0070.00715.80
7.1.80.0000.01215.77
7.1.70.0030.00916.40
7.1.60.0060.00817.61
7.1.50.0040.01116.33
7.1.40.0030.00715.73
7.1.30.0130.00015.64
7.1.20.0070.00715.61
7.1.10.0040.00715.64
7.1.00.0090.03919.05
7.0.330.0050.00515.38
7.0.320.0000.01215.40
7.0.310.0060.00915.40
7.0.300.0040.00715.34
7.0.290.0000.01115.03
7.0.280.0030.00915.53
7.0.270.0060.01315.42
7.0.260.0090.00615.33
7.0.250.0030.00715.20
7.0.240.0040.00715.20
7.0.230.0090.00315.36
7.0.220.0040.01115.33
7.0.210.0000.01315.25
7.0.200.0270.00714.88
7.0.190.0110.00415.08
7.0.180.0060.00315.42
7.0.170.0130.00015.28
7.0.160.0050.00515.20
7.0.150.0110.00315.50
7.0.140.0030.01015.21
7.0.130.0080.00015.23
7.0.120.0050.00515.11
7.0.110.0040.00715.48
7.0.100.0060.00615.38
7.0.90.0040.00815.17
7.0.80.0090.00615.32
7.0.70.0070.00415.34
7.0.60.0150.03818.62
7.0.50.0050.04416.68
7.0.40.0080.02216.74
7.0.30.0190.03916.76
7.0.20.0210.04316.56
7.0.10.0060.04616.89
7.0.00.0120.04216.72
5.6.400.0080.00614.68
5.6.390.0070.01014.24
5.6.380.0080.00814.56
5.6.370.0000.01313.91
5.6.360.0080.00414.31
5.6.350.0120.00314.24
5.6.340.0030.00614.19
5.6.330.0070.01014.46
5.6.320.0040.00814.59
5.6.310.0090.00314.11
5.6.300.0070.00714.41
5.6.290.0040.00714.29
5.6.280.0020.02417.60
5.6.270.0070.00714.25
5.6.260.0110.00414.40
5.6.250.0000.01514.13
5.6.240.0110.00414.09
5.6.230.0000.01114.20
5.6.220.0040.00414.12
5.6.210.0060.04317.32
5.6.200.0050.03416.27
5.6.190.0090.04417.54
5.6.180.0140.02417.27
5.6.170.0130.03317.46
5.6.160.0130.02017.64
5.6.150.0070.04316.37
5.6.140.0070.04316.10
5.6.130.0070.02216.15
5.6.120.0060.04517.69
5.6.110.0030.04717.69
5.6.100.0030.02517.67
5.6.90.0080.03817.56
5.6.80.0070.04417.29
5.6.70.0080.00814.35
5.6.60.0030.00914.19
5.6.50.0070.00314.19
5.6.40.0140.00014.45
5.6.30.0060.00914.31
5.6.20.0070.00714.47
5.6.10.0030.00714.16
5.6.00.0030.00714.21
5.5.380.0100.00314.19
5.5.370.0040.00714.34
5.5.360.0030.01014.45
5.5.350.0120.02017.23
5.5.340.0040.04316.21
5.5.330.0100.03317.43
5.5.320.0230.04017.43
5.5.310.0150.03217.18
5.5.300.0050.04716.13
5.5.290.0070.04316.09
5.5.280.0050.04417.49
5.5.270.0030.02517.38
5.5.260.0080.03617.46
5.5.250.0070.04017.30
5.5.240.0150.04017.15
5.5.230.0130.00014.08
5.5.220.0060.00614.20
5.5.210.0030.01214.24
5.5.200.0090.00014.27
5.5.190.0080.00414.48
5.5.180.0030.01014.35
5.5.170.0000.01413.84
5.5.160.0030.00914.06
5.5.150.0060.00614.14
5.5.140.0000.01514.44
5.5.130.0000.00914.28
5.5.120.0100.00314.40
5.5.110.0040.00814.17
5.5.100.0000.00814.27
5.5.90.0040.01114.41
5.5.80.0100.00314.10
5.5.70.0140.00013.92
5.5.60.0040.00414.21
5.5.50.0000.01014.34
5.5.40.0000.00913.78
5.5.30.0030.01014.10
5.5.20.0060.00614.00
5.5.10.0080.00613.73
5.5.00.0030.00914.36

preferences:
46.21 ms | 401 KiB | 5 Q