3v4l.org

run code in 300+ PHP versions simultaneously
<?php $myInstance = new MyClass('ciao'); $res = $myInstance->doSomething($myInstance->getName()); print($res . ' ' . $myInstance->getName()); class MyClass { private $_name; public function setName($name) { $this->_name = $name; } public function getName() { return $this->_name; } public function __construct($name) { $this->_name = $name; } public function doSomething(&$value) { $value = $value . '_MODIFIED'; return $value; } }

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.75
8.3.50.0130.00717.43
8.3.40.0080.00818.79
8.3.30.0040.01118.81
8.3.20.0040.00418.67
8.3.10.0060.00318.95
8.3.00.0030.00519.50
8.2.180.0070.00718.54
8.2.170.0040.01122.96
8.2.160.0090.00621.02
8.2.150.0050.00324.18
8.2.140.0030.00524.66
8.2.130.0040.00426.16
8.2.120.0080.00020.94
8.2.110.0000.01022.30
8.2.100.0120.00017.91
8.2.90.0040.00417.73
8.2.80.0040.00417.97
8.2.70.0050.00317.89
8.2.60.0080.00017.80
8.2.50.0030.00519.43
8.2.40.0000.01120.48
8.2.30.0000.01018.03
8.2.20.0060.00319.43
8.2.10.0000.00717.58
8.2.00.0040.00417.75
8.1.280.0090.00925.92
8.1.270.0000.00724.66
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0040.00423.92
8.1.230.0090.00320.86
8.1.220.0080.00017.74
8.1.210.0000.00818.77
8.1.200.0030.00717.35
8.1.190.0000.00817.35
8.1.180.0000.01018.10
8.1.170.0060.00318.51
8.1.160.0070.00018.80
8.1.150.0000.00818.60
8.1.140.0070.00017.46
8.1.130.0030.00317.83
8.1.120.0000.00717.36
8.1.110.0000.00717.47
8.1.100.0000.00717.31
8.1.90.0000.00717.48
8.1.80.0070.00017.38
8.1.70.0030.00317.35
8.1.60.0000.00917.58
8.1.50.0040.00417.45
8.1.40.0080.00017.52
8.1.30.0030.00617.55
8.1.20.0000.00717.54
8.1.10.0030.00517.57
8.1.00.0000.00817.40
8.0.300.0030.00320.07
8.0.290.0080.00016.75
8.0.280.0030.00318.46
8.0.270.0000.00717.26
8.0.260.0000.00616.90
8.0.250.0080.00017.02
8.0.240.0030.00517.00
8.0.230.0000.00717.02
8.0.220.0030.00317.00
8.0.210.0000.00816.97
8.0.200.0030.00317.06
8.0.190.0000.00717.02
8.0.180.0030.00317.00
8.0.170.0040.00416.97
8.0.160.0000.00717.00
8.0.150.0040.00416.89
8.0.140.0030.00616.90
8.0.130.0000.00613.43
8.0.120.0000.00916.89
8.0.110.0000.00716.78
8.0.100.0000.00916.83
8.0.90.0070.00016.86
8.0.80.0060.00917.00
8.0.70.0040.00416.79
8.0.60.0040.00416.99
8.0.50.0040.00416.84
8.0.30.0060.01217.07
8.0.20.0080.01317.18
8.0.10.0040.00416.82
8.0.00.0100.01016.62
7.4.330.0000.00512.98
7.4.320.0000.00616.66
7.4.300.0030.00316.58
7.4.290.0070.00016.44
7.4.280.0050.00316.63
7.4.270.0030.00316.60
7.4.260.0060.00013.18
7.4.250.0030.00616.54
7.4.240.0030.00416.55
7.4.230.0000.00716.68
7.4.220.0060.01616.57
7.4.210.0110.00416.60
7.4.200.0030.00316.55
7.4.190.0070.00016.65
7.4.160.0090.00616.74
7.4.150.0090.00916.50
7.4.140.0020.01516.56
7.4.130.0100.01116.42
7.4.120.0080.00816.47
7.4.110.0120.01216.34
7.4.100.0070.01016.54
7.4.90.0160.00716.50
7.4.80.0100.00716.46
7.4.70.0090.00916.62
7.4.60.0100.00716.55
7.4.50.0030.00816.27
7.4.40.0070.00716.45
7.4.30.0110.00716.59
7.4.00.0070.00814.93
7.3.330.0030.00313.23
7.3.320.0060.00013.32
7.3.310.0070.00016.38
7.3.300.0050.00216.38
7.3.290.0100.01016.36
7.3.280.0080.00816.34
7.3.270.0150.00916.55
7.3.260.0140.00316.60
7.3.250.0090.01316.47
7.3.240.0130.00316.43
7.3.230.0100.00716.36
7.3.210.0090.00916.51
7.3.200.0140.00419.39
7.3.190.0060.01216.40
7.3.180.0060.00916.48
7.3.170.0100.00616.41
7.3.160.0080.00816.39
7.3.120.0060.00914.84
7.3.110.0070.01014.77
7.3.100.0100.00614.95
7.3.90.0060.00914.89
7.3.80.0110.00314.63
7.3.70.0030.00814.72
7.3.60.0090.00014.77
7.3.50.0030.00714.77
7.3.40.0100.00314.77
7.3.30.0070.00714.55
7.3.20.0060.00316.55
7.3.10.0070.00716.72
7.3.00.0040.01116.76
7.2.330.0090.01016.68
7.2.320.0100.01016.69
7.2.310.0000.02116.76
7.2.300.0060.01116.64
7.2.290.0040.01116.60
7.2.250.0100.01015.13
7.2.240.0030.01614.87
7.2.230.0120.00315.36
7.2.220.0040.01115.01
7.2.210.0070.00315.03
7.2.200.0080.00615.05
7.2.190.0000.00915.15
7.2.180.0070.01015.04
7.2.170.0030.01214.74
7.2.60.0000.01616.77
7.2.00.0090.00619.43
7.1.330.0070.00715.91
7.1.320.0000.00915.55
7.1.310.0060.00915.84
7.1.300.0050.00315.41
7.1.290.0030.01015.46
7.1.280.0090.00615.90
7.1.270.0000.01415.56
7.1.260.0000.01115.64
7.1.200.0040.00815.75
7.1.100.0030.01018.27
7.1.70.0050.00217.09
7.1.60.0140.01019.40
7.1.50.0100.01434.66
7.1.00.0030.05722.54
7.0.200.0030.00615.00
7.0.140.0070.07021.99
7.0.120.0070.07022.18
7.0.60.0030.06020.04
7.0.50.0000.04717.91
7.0.40.0100.06320.11
7.0.30.0230.04720.34
7.0.20.0200.03720.23
7.0.10.0130.08020.34
7.0.00.0100.07720.18
5.6.210.0030.06020.75
5.6.200.0070.04018.22
5.6.190.0070.04320.52
5.6.180.0430.07720.68
5.6.170.0330.03720.56
5.6.160.0030.08720.55
5.6.150.0070.07718.22
5.6.140.0070.08018.27
5.6.130.0100.08318.27
5.6.120.0170.07320.94
5.6.110.0030.04020.97
5.6.100.0070.08321.12
5.6.90.0070.06720.93
5.6.80.0100.05720.29
5.5.350.0170.07720.43
5.5.340.0100.03717.93
5.5.330.0030.04720.21
5.5.320.0400.06720.31
5.5.310.0230.08720.34
5.5.300.0030.04017.95
5.5.290.0070.07317.99
5.5.280.0030.05020.91
5.5.270.0130.03320.86
5.5.260.0170.07720.78
5.5.250.0100.04720.49
5.5.240.0230.07320.17
5.4.450.0100.06719.20
5.4.440.0070.07719.20
5.4.430.0000.06019.24
5.4.420.0170.06019.47
5.4.410.0100.06319.34
5.4.400.0100.07319.15
5.4.390.0100.07319.14
5.4.380.0070.08019.00
5.4.370.0030.04719.15
5.4.360.0100.07719.11
5.4.350.0130.07018.92
5.4.340.0070.06319.11
5.4.320.0070.08019.20
5.4.310.0100.07719.15
5.4.300.0070.07319.24
5.4.290.0100.06019.14
5.4.280.0100.04719.16
5.4.270.0070.07019.00
5.4.260.0070.03719.26
5.4.250.0070.07319.20
5.4.240.0130.04019.00
5.4.230.0000.05018.93
5.4.220.0130.07318.87
5.4.210.0100.04319.11
5.4.200.0070.06019.23
5.4.190.0000.06019.16
5.4.180.0070.06719.07
5.4.170.0070.04719.25
5.4.160.0030.07719.05
5.4.150.0070.04019.13
5.4.140.0170.06316.51
5.4.130.0200.05716.40
5.4.120.0130.07016.50
5.4.110.0170.05016.43
5.4.100.0130.06016.54
5.4.90.0030.04716.42
5.4.80.0000.04316.37
5.4.70.0070.03716.38
5.4.60.0100.03016.28
5.4.50.0030.03316.25
5.4.40.0030.03316.27
5.4.30.0070.03716.64
5.4.20.0030.03316.64
5.4.10.0070.03016.39
5.4.00.0070.03315.86
5.3.290.0130.07314.84
5.3.280.0070.04014.75
5.3.270.0030.04714.65
5.3.260.0070.04714.60
5.3.250.0100.04014.76
5.3.240.0170.06014.62
5.3.230.0100.07014.61
5.3.220.0000.06714.58
5.3.210.0070.04314.61
5.3.200.0070.04714.64
5.3.190.0000.06314.61
5.3.180.0070.03714.72
5.3.170.0070.03314.63
5.3.160.0030.03714.46
5.3.150.0070.03314.60
5.3.140.0000.04314.73
5.3.130.0030.03714.58
5.3.120.0000.04014.44
5.3.110.0000.04014.44
5.3.100.0030.03714.12
5.3.90.0000.03714.05
5.3.80.0000.03714.04
5.3.70.0030.03714.17
5.3.60.0000.04014.00
5.3.50.0030.04013.96
5.3.40.0000.03714.02
5.3.30.0000.03713.95
5.3.20.0030.03313.64
5.3.10.0070.03013.66
5.3.00.0100.02713.68
5.2.170.0030.02711.11
5.2.160.0000.03011.11
5.2.150.0000.03011.07
5.2.140.0000.03011.16
5.2.130.0000.03011.13
5.2.120.0000.03311.11
5.2.110.0000.03311.13
5.2.100.0030.02711.18
5.2.90.0100.02311.15
5.2.80.0030.02711.14
5.2.70.0030.03311.07
5.2.60.0100.02711.05
5.2.50.0030.02710.94
5.2.40.0030.03011.04
5.2.30.0100.02310.94
5.2.20.0030.02710.96
5.2.10.0030.02710.83
5.2.00.0030.03010.77
5.1.60.0030.0239.99
5.1.50.0000.0279.97
5.1.40.0000.03010.00
5.1.30.0070.02010.31
5.1.20.0070.02010.41
5.1.10.0030.02310.12
5.1.00.0000.03010.07
5.0.50.0070.0178.52
5.0.40.0000.0238.42
5.0.30.0000.0408.39
5.0.20.0000.0208.26
5.0.10.0000.0308.21
5.0.00.0070.0378.23
4.4.90.0000.0178.21
4.4.80.0030.0178.21
4.4.70.0030.0138.21
4.4.60.0000.0178.21
4.4.50.0000.0178.21
4.4.40.0000.0278.21
4.4.30.0030.0138.21
4.4.20.0000.0208.21
4.4.10.0030.0138.21
4.4.00.0000.0238.21
4.3.110.0000.0178.21
4.3.100.0000.0138.21
4.3.90.0030.0138.21
4.3.80.0030.0578.21
4.3.70.0030.0338.21
4.3.60.0070.0308.21
4.3.50.0070.0308.21
4.3.40.0000.0478.21
4.3.30.0000.0238.21
4.3.20.0000.0208.21
4.3.10.0030.0138.21
4.3.00.0000.0338.21

preferences:
42.03 ms | 401 KiB | 5 Q