3v4l.org

run code in 300+ PHP versions simultaneously
<?php class myClass { protected $value; function setValue($value) : self { $this->value = $value; } function doubleValue() : self { $this->value*=2; } function getValue() : self { return $this->value; } } $calculator = new myClass(); $returnValue = $calculator->setValue(3) ->doubleValue() ->getValue(); echo $returnValue;

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.0090.00618.55
8.3.50.0030.01419.75
8.3.40.0120.00418.84
8.3.30.0110.00418.79
8.3.20.0040.00420.29
8.3.10.0040.00421.78
8.3.00.0070.00319.51
8.2.180.0070.00716.63
8.2.170.0070.00722.96
8.2.160.0090.00619.33
8.2.150.0040.00424.18
8.2.140.0030.00624.66
8.2.130.0050.00322.11
8.2.120.0070.00026.35
8.2.110.0040.00421.00
8.2.100.0110.00018.16
8.2.90.0000.00818.97
8.2.80.0040.00417.97
8.2.70.0060.00317.63
8.2.60.0080.00018.03
8.2.50.0050.00318.10
8.2.40.0050.00322.08
8.2.30.0000.00819.12
8.2.20.0040.00417.55
8.2.10.0040.00418.05
8.2.00.0030.00618.01
8.1.280.0100.00325.92
8.1.270.0040.00423.99
8.1.260.0040.00428.09
8.1.250.0080.00828.09
8.1.240.0170.00323.92
8.1.230.0070.00417.77
8.1.220.0040.00417.74
8.1.210.0030.00618.77
8.1.200.0000.00917.36
8.1.190.0000.00817.23
8.1.180.0040.00418.10
8.1.170.0080.00018.66
8.1.160.0030.00322.04
8.1.150.0040.00420.52
8.1.140.0040.00419.43
8.1.130.0070.00017.70
8.1.120.0040.00417.37
8.1.110.0080.00017.27
8.1.100.0040.00417.43
8.1.90.0050.00317.46
8.1.80.0060.00317.41
8.1.70.0000.00717.36
8.1.60.0040.00417.54
8.1.50.0050.00317.51
8.1.40.0140.00017.41
8.1.30.0050.00317.50
8.1.20.0040.00417.69
8.1.10.0040.00417.59
8.1.00.0050.00217.43
8.0.300.0070.00018.77
8.0.290.0000.00716.63
8.0.280.0000.00718.38
8.0.270.0070.00017.10
8.0.260.0000.00817.19
8.0.250.0000.00816.99
8.0.240.0050.00316.92
8.0.230.0000.00716.93
8.0.220.0030.00316.86
8.0.210.0040.00416.86
8.0.200.0000.00716.91
8.0.190.0070.00016.88
8.0.180.0040.00416.90
8.0.170.0040.00416.95
8.0.160.0000.00816.86
8.0.150.0030.00516.73
8.0.140.0040.00416.85
8.0.130.0030.00313.25
8.0.120.0040.00416.83
8.0.110.0070.00016.93
8.0.100.0040.00416.68
8.0.90.0050.00216.74
8.0.80.0090.00916.77
8.0.70.0040.00416.94
8.0.60.0040.00416.77
8.0.50.0050.00216.75
8.0.30.0080.00817.20
8.0.20.0080.01117.40
8.0.10.0040.00416.90
8.0.00.0060.01116.64
7.4.330.0020.00215.09
7.4.320.0030.00316.57
7.4.300.0070.00016.60
7.4.290.0030.00316.52
7.4.280.0040.00416.34
7.4.270.0060.00316.48
7.4.260.0050.00216.62
7.4.250.0050.00316.41
7.4.240.0080.00016.44
7.4.230.0000.00716.53
7.4.220.0170.00716.46
7.4.210.0050.01116.58
7.4.200.0070.00016.41
7.4.160.0090.00616.53
7.4.150.0070.01117.40
7.4.140.0130.00517.86
7.4.130.0130.00816.37
7.4.120.0130.00516.49
7.4.110.0120.00916.31
7.4.100.0060.00916.61
7.4.90.0030.01416.32
7.4.80.0120.00619.39
7.4.70.0100.00716.39
7.4.60.0160.00316.52
7.4.50.0040.01116.38
7.4.40.0110.00616.49
7.4.30.0190.00316.40
7.4.00.0150.00014.88
7.3.330.0000.00613.36
7.3.320.0050.00013.37
7.3.310.0030.00316.41
7.3.300.0050.00216.35
7.3.290.0000.00716.22
7.3.280.0070.01016.32
7.3.270.0070.01017.40
7.3.260.0060.01116.51
7.3.250.0080.01416.32
7.3.240.0100.01216.43
7.3.230.0130.00316.62
7.3.210.0140.00416.48
7.3.200.0140.00716.48
7.3.190.0100.00616.56
7.3.180.0180.00316.58
7.3.170.0100.00616.38
7.3.160.0090.01216.27
7.2.330.0030.01416.67
7.2.320.0160.00916.33
7.2.310.0090.00916.66
7.2.300.0080.00916.47
7.2.290.0120.01216.65
7.2.60.0040.01116.94
7.2.00.0100.00619.41
7.1.200.0070.00715.39
7.1.100.0000.01118.14
7.1.70.0050.00217.13
7.1.60.0000.01119.29
7.1.50.0030.01316.79
7.1.00.0100.06722.28
7.0.200.0360.00314.43
7.0.80.0400.06719.91
7.0.70.0100.05720.00
7.0.60.0170.05020.00
7.0.50.0130.05320.38
7.0.40.0070.06020.35
7.0.30.0130.07720.41
7.0.20.0100.06020.36
7.0.10.0100.06020.33
7.0.00.0230.05020.30
5.6.230.0130.05320.75
5.6.220.0130.06020.62
5.6.210.0200.05020.83
5.6.200.0070.06721.05
5.6.190.0200.04721.02
5.6.180.0130.06021.02
5.6.170.0170.05721.06
5.6.160.0130.05721.06
5.6.150.0130.05721.09
5.6.140.0100.05721.07
5.6.130.0100.06321.07
5.6.120.0170.05321.05
5.6.110.0270.04321.05
5.6.100.0130.05721.07
5.6.90.0170.05321.03
5.6.80.0170.05020.44
5.6.70.0200.04320.44
5.6.60.0200.04320.43
5.6.50.0070.05720.57
5.6.40.0070.06320.38
5.6.30.0000.06720.41
5.6.20.0070.06020.36
5.6.10.0100.05320.39
5.6.00.0100.05320.40
5.5.370.0070.06020.43
5.5.360.0130.06020.39
5.5.350.0130.05720.42
5.5.340.0100.06020.82
5.5.330.0100.06020.84
5.5.320.0100.06020.91
5.5.310.0000.07720.93
5.5.300.0030.07020.88
5.5.290.0100.08020.95
5.5.280.0170.05720.80
5.5.270.0200.05020.88
5.5.260.0030.07020.91
5.5.250.0170.05320.75
5.5.240.0070.05720.32
5.5.230.0100.05720.34
5.5.220.0030.06020.31
5.5.210.0070.05720.26
5.5.200.0170.05020.27
5.5.190.0100.05720.21
5.5.180.0030.06320.29
5.5.160.0070.05720.20
5.5.150.0030.06020.23
5.5.140.0170.04720.25
5.5.130.0070.05720.21
5.5.120.0130.05020.05
5.5.110.0200.04320.24
5.5.100.0100.05320.15
5.5.90.0170.04720.19
5.5.80.0170.04720.17
5.5.70.0100.05720.06
5.5.60.0070.05720.18
5.5.50.0170.04320.11
5.5.40.0100.05720.05
5.5.30.0100.05720.08
5.5.20.0200.04720.02
5.5.10.0100.05320.10
5.5.00.0170.05020.17

preferences:
46.7 ms | 400 KiB | 5 Q