3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* class A { public function __set($name, $value) { echo func_get_arg(0); $name = "xxx"; echo func_get_arg(0); } public function test($name) { echo func_get_arg(0); $name = "xxx"; echo func_get_arg(0); } } $a = new A(); $a->test('test'); $a->test = 5; function byVal($arg) { echo 'As passed : ', var_export(func_get_arg(0)), PHP_EOL; $arg = 'baz'; echo 'After change : ', var_export(func_get_arg(0)), PHP_EOL; } function byRef(&$arg) { echo 'As passed : ', var_export(func_get_arg(0)), PHP_EOL; $arg = 'baz'; echo 'After change : ', var_export(func_get_arg(0)), PHP_EOL; } $arg = 'bar'; byVal($arg); byRef($arg); */ function set($name, $value) { $a = array(); echo $name; // property setter support $originalName = $name; $name[0] = $name[0] & "\xDF"; // case-sensitive checking, capitalize first character echo $name; // protected attribute support $properties = $this->listObjectProperties(); if (isset($a[$name = $originalName])) { echo $name; } echo $name; }

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.00716.48
8.3.50.0150.00522.04
8.3.40.0140.00718.55
8.3.30.0000.01518.43
8.3.20.0070.00020.34
8.3.10.0040.00423.66
8.3.00.0080.00017.80
8.2.180.0150.00618.29
8.2.170.0120.00322.96
8.2.160.0100.00320.35
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0070.00026.16
8.2.120.0060.00317.50
8.2.110.0090.00320.52
8.2.100.0090.00617.80
8.2.90.0050.00219.14
8.2.80.0040.00417.97
8.2.70.0040.00417.38
8.2.60.0000.00817.91
8.2.50.0080.00018.07
8.2.40.0080.00021.07
8.2.30.0000.00720.50
8.2.20.0040.00417.48
8.2.10.0040.00417.94
8.2.00.0000.00717.84
8.1.280.0110.00325.92
8.1.270.0070.00024.66
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0000.00922.48
8.1.230.0040.00817.53
8.1.220.0060.00317.74
8.1.210.0060.00318.77
8.1.200.0060.00317.22
8.1.190.0040.00417.23
8.1.180.0040.00418.10
8.1.170.0040.00418.32
8.1.160.0000.00821.86
8.1.150.0040.00418.68
8.1.140.0040.00419.38
8.1.130.0030.00517.63
8.1.120.0000.00817.27
8.1.110.0000.00717.26
8.1.100.0070.00017.33
8.1.90.0000.00817.26
8.1.80.0000.00717.39
8.1.70.0030.00317.28
8.1.60.0030.00617.40
8.1.50.0000.00817.27
8.1.40.0100.00017.39
8.1.30.0050.00317.46
8.1.20.0000.00717.50
8.1.10.0000.00717.40
8.1.00.0070.00017.32
8.0.300.0080.00018.77
8.0.290.0040.00416.63
8.0.280.0000.00718.32
8.0.270.0080.00017.13
8.0.260.0030.00317.14
8.0.250.0000.00716.73
8.0.240.0000.00716.83
8.0.230.0000.00816.80
8.0.220.0050.00316.80
8.0.210.0050.00316.75
8.0.200.0050.00316.76
8.0.190.0030.00616.72
8.0.180.0070.00016.77
8.0.170.0000.00716.75
8.0.160.0000.00716.67
8.0.150.0000.00716.78
8.0.140.0000.00716.62
8.0.130.0060.00313.23
8.0.120.0040.00416.73
8.0.110.0040.00416.71
8.0.100.0000.00716.68
8.0.90.0000.00716.61
8.0.80.0070.01416.77
8.0.70.0040.00316.61
8.0.60.0070.00016.82
8.0.50.0000.00816.70
8.0.30.0110.00716.88
8.0.20.0090.00917.40
8.0.10.0050.00316.80
8.0.00.0100.00816.65
7.4.330.0050.00015.08
7.4.320.0000.00716.42
7.4.300.0030.00316.28
7.4.290.0040.00416.39
7.4.280.0040.00416.28
7.4.270.0030.00316.52
7.4.260.0030.00316.39
7.4.250.0070.00016.43
7.4.240.0040.00416.33
7.4.230.0000.00716.48
7.4.220.0080.00916.28
7.4.210.0030.01016.43
7.4.200.0040.00416.47
7.4.160.0070.00716.46
7.4.150.0130.01017.40
7.4.140.0140.00717.86
7.4.130.0060.01016.29
7.4.120.0080.01116.46
7.4.110.0070.01016.33
7.4.100.0150.00916.30
7.4.90.0060.01316.38
7.4.80.0130.00319.39
7.4.70.0030.01416.30
7.4.60.0100.00716.24
7.4.50.0030.00616.04
7.4.40.0030.01316.32
7.4.30.0170.00416.30
7.4.00.0070.00714.76
7.3.330.0000.00613.19
7.3.320.0000.00513.14
7.3.310.0000.00716.17
7.3.300.0000.00716.10
7.3.290.0080.00716.18
7.3.280.0100.01216.17
7.3.270.0100.00717.40
7.3.260.0080.00816.43
7.3.250.0090.00816.29
7.3.240.0110.00816.29
7.3.230.0160.00016.39
7.3.210.0070.01016.32
7.3.200.0070.01416.50
7.3.190.0150.00316.40
7.3.180.0050.01216.17
7.3.170.0100.00716.27
7.3.160.0040.01116.20
7.3.10.0060.00616.39
7.3.00.0140.00016.56
7.2.330.0070.01616.46
7.2.320.0060.01216.51
7.2.310.0030.01416.49
7.2.300.0130.01016.32
7.2.290.0070.01016.54
7.2.130.0040.00816.29
7.2.120.0100.00316.82
7.2.110.0110.00316.80
7.2.100.0120.00016.87
7.2.90.0120.00316.75
7.2.80.0070.00716.66
7.2.70.0090.00616.60
7.2.60.0030.00916.66
7.2.50.0060.00616.72
7.2.40.0100.00316.52
7.2.30.0000.01416.88
7.2.20.0040.00716.69
7.2.10.0060.01216.59
7.2.00.0030.00917.88
7.1.250.0030.01015.27
7.1.100.0030.00617.79
7.1.70.0040.00816.99
7.1.60.0120.01219.11
7.1.50.0090.01216.69
7.1.00.0030.07722.57
7.0.200.0100.01014.44
7.0.60.0100.05720.02
7.0.50.0000.04717.95
7.0.40.0230.07320.18
7.0.30.0570.07020.23
7.0.20.0130.04320.32
7.0.10.0270.08320.23
7.0.00.0170.07720.06
5.6.280.0030.03321.17
5.6.210.0100.06020.77
5.6.200.0030.04018.15
5.6.190.0030.06020.45
5.6.180.0330.07320.44
5.6.170.0330.04320.71
5.6.160.0130.07720.55
5.6.150.0030.08318.14
5.6.140.0000.04318.28
5.6.130.0070.07018.20
5.6.120.0100.08020.99
5.6.110.0070.07721.04
5.6.100.0000.07720.99
5.6.90.0100.07321.02
5.6.80.0030.04020.34
5.6.70.0270.05320.51
5.5.350.0170.07320.50
5.5.340.0130.04018.03
5.5.330.0070.04020.34
5.5.320.0230.04720.41
5.5.310.0370.07320.23
5.5.300.0030.06718.05
5.5.290.0100.03318.01
5.5.280.0030.06320.80
5.5.270.0130.07320.76
5.5.260.0100.08320.96
5.5.250.0070.08320.55
5.5.240.0030.08020.07
5.4.450.0270.07019.31
5.4.440.0300.05019.19
5.4.430.0200.05019.38
5.4.420.0070.06019.58
5.4.410.0130.07019.42
5.4.400.0100.06018.87
5.4.390.0170.05718.84
5.4.380.0300.07019.08
5.4.370.0230.05019.14
5.4.360.0300.04319.26
5.4.350.0200.05319.22
5.4.340.0230.05319.06
5.4.320.0070.06319.06
5.4.310.0270.06019.26
5.4.300.0230.06019.39
5.4.290.0130.05319.30
5.4.280.0130.05318.84
5.4.270.0430.05719.14
5.4.260.0600.04719.22
5.4.250.0670.05319.37
5.4.240.0630.05319.22
5.4.230.0530.06019.30
5.4.220.0670.05719.25
5.4.210.0700.05019.25
5.4.200.0630.05719.05
5.4.190.0730.04318.83
5.4.180.0800.04319.15
5.4.170.0730.05718.80
5.4.160.0600.05719.29
5.4.150.0730.05719.23
5.4.140.0830.05716.48
5.4.130.0600.04316.29
5.4.120.0630.05016.30
5.4.110.0800.04316.57
5.4.100.0670.06016.62
5.4.90.0670.05016.63
5.4.80.0670.04716.26
5.4.70.0670.05016.50
5.4.60.0600.05016.55
5.4.50.0770.06716.42
5.4.40.0900.04316.27
5.4.30.0500.05716.62
5.4.20.0630.04316.39
5.4.10.0600.06016.59
5.4.00.0700.04715.93

preferences:
57.75 ms | 401 KiB | 5 Q