3v4l.org

run code in 300+ PHP versions simultaneously
<?php class myClass { } $obj = new myClass; $flower = "violet"; $obj->color = function()use($flower){ $arr = ["rose"=>"red", "violet"=>"blue", "grass"=>"green"]; return $arr[$flower]; }; echo "...{$flower}s are ",$obj->color();

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.0150.00016.63
8.3.50.0130.00522.04
8.3.40.0040.01118.97
8.3.30.0040.01118.65
8.3.20.0070.00020.21
8.3.10.0040.00421.91
8.3.00.0040.00421.87
8.2.180.0130.00716.48
8.2.170.0140.00322.96
8.2.160.0120.00320.39
8.2.150.0090.00024.18
8.2.140.0000.00824.66
8.2.130.0080.00020.75
8.2.120.0050.00326.35
8.2.110.0030.00620.79
8.2.100.0040.00818.03
8.2.90.0040.00419.05
8.2.80.0050.00317.97
8.2.70.0060.00317.50
8.2.60.0030.00618.03
8.2.50.0090.00018.09
8.2.40.0060.00322.50
8.2.30.0080.00019.52
8.2.20.0000.00817.66
8.2.10.0070.00018.20
8.2.00.0050.00318.18
8.1.280.0070.00725.92
8.1.270.0160.00322.06
8.1.260.0000.00728.09
8.1.250.0000.00828.09
8.1.240.0030.00722.47
8.1.230.0040.00717.52
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0000.01017.35
8.1.190.0060.00317.22
8.1.180.0040.00418.10
8.1.170.0040.00418.59
8.1.160.0000.00720.65
8.1.150.0040.00418.82
8.1.140.0060.00319.47
8.1.130.0030.00317.77
8.1.120.0000.00717.47
8.1.110.0000.00717.47
8.1.100.0070.00017.51
8.1.90.0000.00817.35
8.1.80.0030.00517.45
8.1.70.0030.00317.47
8.1.60.0000.00817.44
8.1.50.0000.00817.55
8.1.40.0050.00317.42
8.1.30.0080.00017.64
8.1.20.0040.00417.47
8.1.10.0000.00817.52
8.1.00.0080.00017.54
8.0.300.0040.00418.77
8.0.290.0040.00416.75
8.0.280.0070.00018.51
8.0.270.0030.00317.27
8.0.260.0030.00317.23
8.0.250.0070.00017.11
8.0.240.0000.00616.93
8.0.230.0000.00716.92
8.0.220.0070.00016.88
8.0.210.0070.00016.85
8.0.200.0030.00317.07
8.0.190.0040.00416.99
8.0.180.0000.00716.88
8.0.170.0080.00017.00
8.0.160.0030.00516.94
8.0.150.0040.00416.92
8.0.140.0000.00716.95
8.0.130.0050.00013.32
8.0.120.0000.00816.83
8.0.110.0030.00516.88
8.0.100.0000.00716.94
8.0.90.0000.00717.04
8.0.80.0130.00316.96
8.0.70.0040.00416.86
8.0.60.0000.00716.85
8.0.50.0080.00016.92
8.0.30.0150.00417.25
8.0.20.0130.00617.40
8.0.10.0040.00416.98
8.0.00.0110.00716.84
7.4.330.0000.00516.76
7.4.320.0000.00616.64
7.4.300.0070.00016.44
7.4.290.0040.00416.51
7.4.280.0040.00416.53
7.4.270.0030.00316.64
7.4.260.0000.00716.50
7.4.250.0040.00416.62
7.4.240.0020.00516.55
7.4.230.0030.00316.61
7.4.220.0120.01216.69
7.4.210.0050.01016.59
7.4.200.0040.00416.32
7.4.160.0100.00616.53
7.4.150.0090.00917.40
7.4.140.0130.00617.86
7.4.130.0090.01116.55
7.4.120.0100.00716.58
7.4.110.0100.00716.69
7.4.100.0120.00916.47
7.4.90.0070.01316.47
7.4.80.0080.00819.39
7.4.70.0000.01516.49
7.4.60.0070.01116.57
7.4.50.0070.01016.57
7.4.40.0120.00316.44
7.4.30.0150.00816.56
7.4.00.0060.00914.73
7.3.330.0030.00313.25
7.3.320.0060.00013.36
7.3.310.0040.00416.29
7.3.300.0030.00316.30
7.3.290.0040.00316.41
7.3.280.0100.00716.43
7.3.270.0090.00917.40
7.3.260.0170.00416.38
7.3.250.0090.00916.44
7.3.240.0130.00816.45
7.3.230.0090.00816.58
7.3.210.0100.00716.29
7.3.200.0150.00719.39
7.3.190.0130.00316.55
7.3.180.0090.00616.30
7.3.170.0030.01616.48
7.3.160.0100.00716.43
7.3.10.0000.01416.69
7.3.00.0120.00316.70
7.2.330.0070.01016.55
7.2.320.0130.00716.71
7.2.310.0060.01116.64
7.2.300.0030.01316.77
7.2.290.0100.00816.65
7.2.130.0060.00916.98
7.2.120.0060.00916.79
7.2.110.0130.00016.95
7.2.100.0030.01016.66
7.2.90.0040.01116.72
7.2.80.0030.01216.78
7.2.70.0060.00916.63
7.2.60.0070.00916.83
7.2.50.0100.00616.77
7.2.40.0030.00616.98
7.2.30.0070.01116.94
7.2.20.0030.01016.90
7.2.10.0070.00716.97
7.2.00.0050.00918.02
7.1.250.0040.00815.55
7.1.200.0070.00715.72
7.1.100.0000.01417.93
7.1.70.0000.01117.07
7.1.60.0160.00619.40
7.1.50.0070.01016.79
7.1.00.0030.07722.35
7.0.200.0440.00614.80
7.0.60.0270.05319.91
7.0.50.0100.05017.87
7.0.40.0100.08020.18
7.0.30.0300.07020.22
7.0.20.0270.04020.14
7.0.10.0000.06720.19
7.0.00.0100.07320.06
5.6.280.0070.07021.10
5.6.210.0230.06020.60
5.6.200.0100.05718.25
5.6.190.0170.07320.64
5.6.180.0330.04720.46
5.6.170.0300.08320.62
5.6.160.0000.04320.47
5.6.150.0030.05718.18
5.6.140.0130.07718.24
5.6.130.0030.04018.28
5.6.120.0070.08321.04
5.6.110.0130.08021.01
5.6.100.0130.06721.11
5.6.90.0100.04020.99
5.6.80.0070.08020.51
5.5.350.0300.07320.35
5.5.340.0070.08717.98
5.5.330.0230.04020.21
5.5.320.0530.07020.27
5.5.310.0300.04020.42
5.5.300.0030.08717.95
5.5.290.0170.05017.99
5.5.280.0070.06720.81
5.5.270.0070.08320.79
5.5.260.0030.04320.77
5.5.250.0130.06320.69
5.5.240.3900.04320.36

preferences:
51.37 ms | 401 KiB | 5 Q