3v4l.org

run code in 300+ PHP versions simultaneously
<?php class myClass { public function __construct(){ echo __CLASS__; } } $obj = new myClass; $flower = "violet"; $obj->clr = "bluish"; $obj->color = function()use($flower){ $arr = ["rose"=>"red", "violet"=>"blue", "grass"=>"green"]; return $arr[$flower]; }; echo "...{$flower}s are ",$obj->clr,"\n"; 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.0070.01116.75
8.3.50.0070.00716.23
8.3.40.0070.00718.90
8.3.30.0110.00318.92
8.3.20.0040.00420.14
8.3.10.0040.00421.70
8.3.00.0060.00321.64
8.2.180.0120.00916.73
8.2.170.0000.01422.96
8.2.160.0100.00320.35
8.2.150.0000.00824.18
8.2.140.0080.00024.66
8.2.130.0050.00320.87
8.2.120.0040.00426.35
8.2.110.0060.00319.31
8.2.100.0090.00317.93
8.2.90.0050.00319.17
8.2.80.0040.00417.97
8.2.70.0000.00817.75
8.2.60.0040.00417.80
8.2.50.0040.00418.09
8.2.40.0050.00322.19
8.2.30.0000.00919.42
8.2.20.0080.00017.80
8.2.10.0000.00718.13
8.2.00.0050.00218.13
8.1.280.0070.01325.92
8.1.270.0100.00322.14
8.1.260.0000.00828.09
8.1.250.0080.00028.09
8.1.240.0030.00622.47
8.1.230.0070.00417.76
8.1.220.0030.00617.74
8.1.210.0000.00818.77
8.1.200.0030.00617.23
8.1.190.0000.00817.35
8.1.180.0040.00418.10
8.1.170.0000.00818.59
8.1.160.0070.00020.90
8.1.150.0000.00718.76
8.1.140.0040.00419.59
8.1.130.0050.00217.77
8.1.120.0050.00217.40
8.1.110.0040.00417.50
8.1.100.0000.00717.49
8.1.90.0040.00417.50
8.1.80.0000.00717.36
8.1.70.0000.00817.36
8.1.60.0040.00417.59
8.1.50.0030.00617.43
8.1.40.0040.00417.55
8.1.30.0030.00517.50
8.1.20.0040.00417.65
8.1.10.0000.00717.54
8.1.00.0030.00517.53
8.0.300.0070.00018.77
8.0.290.0080.00016.75
8.0.280.0000.00718.50
8.0.270.0040.00417.19
8.0.260.0030.00317.16
8.0.250.0000.00616.99
8.0.240.0030.00316.91
8.0.230.0030.00316.88
8.0.220.0070.00016.91
8.0.210.0000.00716.96
8.0.200.0050.00216.97
8.0.190.0030.00317.02
8.0.180.0060.00317.02
8.0.170.0000.00816.95
8.0.160.0040.00416.84
8.0.150.0050.00316.95
8.0.140.0050.00216.95
8.0.130.0030.00313.41
8.0.120.0040.00416.82
8.0.110.0040.00316.97
8.0.100.0030.00616.97
8.0.90.0000.00816.82
8.0.80.0040.01116.84
8.0.70.0030.00516.90
8.0.60.0080.00016.80
8.0.50.0000.00716.91
8.0.30.0090.00816.86
8.0.20.0110.00817.40
8.0.10.0080.00017.06
8.0.00.0120.00616.79
7.4.330.0000.00516.83
7.4.320.0040.00416.60
7.4.300.0050.00316.51
7.4.290.0030.00316.58
7.4.280.0040.00416.62
7.4.270.0000.00716.51
7.4.260.0030.00316.47
7.4.250.0040.00416.51
7.4.240.0040.00416.47
7.4.230.0000.00716.36
7.4.220.0100.01016.52
7.4.210.0080.00816.53
7.4.200.0030.00316.30
7.4.160.0090.00616.45
7.4.150.0130.00917.40
7.4.140.0120.00917.86
7.4.130.0080.01016.63
7.4.120.0060.01216.52
7.4.110.0070.01716.59
7.4.100.0100.00716.56
7.4.90.0190.00216.37
7.4.80.0080.01119.39
7.4.70.0100.00716.52
7.4.60.0080.00816.59
7.4.50.0040.01116.70
7.4.40.0130.00316.41
7.4.30.0060.01016.53
7.4.00.0110.00514.89
7.3.330.0030.00313.42
7.3.320.0000.00613.26
7.3.310.0070.00016.43
7.3.300.0030.00316.30
7.3.290.0000.00616.27
7.3.280.0110.00816.40
7.3.270.0080.01117.40
7.3.260.0030.01316.38
7.3.250.0080.01116.41
7.3.240.0080.01116.42
7.3.230.0030.01416.39
7.3.210.0100.00616.49
7.3.200.0070.01319.39
7.3.190.0080.00816.39
7.3.180.0130.00316.63
7.3.170.0130.00616.44
7.3.160.0150.00316.61
7.3.120.0060.01314.73
7.3.110.0060.01214.49
7.3.100.0040.01114.86
7.3.90.0080.00414.86
7.3.80.0090.00014.58
7.3.70.0000.01314.61
7.3.60.0120.00314.78
7.3.50.0000.01214.63
7.3.40.0030.01014.85
7.3.30.0030.01014.74
7.3.20.0000.00916.38
7.3.10.0000.00816.49
7.3.00.0070.00716.63
7.2.330.0070.01016.61
7.2.320.0120.00616.70
7.2.310.0030.01416.53
7.2.300.0130.00316.51
7.2.290.0080.00816.56
7.2.250.0040.01414.79
7.2.240.0060.01314.71
7.2.230.0070.00714.53
7.2.220.0090.00614.76
7.2.210.0000.01015.11
7.2.200.0090.00614.79
7.2.190.0040.01114.99
7.2.180.0110.00415.19
7.2.170.0000.00915.00
7.2.110.0220.01016.23
7.2.80.0040.00716.84
7.2.60.0070.00716.73
7.2.00.0030.01219.48
7.1.330.0100.00315.89
7.1.320.0030.01215.67
7.1.310.0040.00715.87
7.1.300.0030.00815.74
7.1.290.0000.00915.87
7.1.280.0030.00715.83
7.1.270.0000.00915.70
7.1.260.0070.00416.02
7.1.200.0100.00515.86
7.1.100.0000.01417.90
7.1.70.0040.00417.12
7.1.60.0140.00719.40
7.1.50.0070.01316.96
7.1.00.0000.07722.51
7.0.200.0490.01014.62
7.0.60.0230.08319.93
7.0.50.0070.08017.84
7.0.40.0130.05020.23
7.0.30.0300.06020.34
7.0.20.0300.07720.25
7.0.10.0000.05320.24
7.0.00.0000.04320.18
5.6.280.0030.07020.91
5.6.210.0170.07020.75
5.6.200.0100.08018.14
5.6.190.0070.06720.39
5.6.180.0300.08020.55
5.6.170.0300.08020.48
5.6.160.0100.07320.44
5.6.150.0170.07718.16
5.6.140.0070.03718.21
5.6.130.0170.05718.15
5.6.120.0130.08021.00
5.6.110.0000.04321.05
5.6.100.0100.08021.13
5.6.90.0130.08020.99
5.6.80.0070.07320.44
5.5.350.0270.07020.44
5.5.340.0000.04717.95
5.5.330.0000.07320.57
5.5.320.0570.06720.28
5.5.310.0230.05020.36
5.5.300.0030.04018.07
5.5.290.0030.05717.95
5.5.280.0170.06720.75
5.5.270.0000.05020.77
5.5.260.0070.04020.80
5.5.250.0130.07320.70
5.5.240.0230.07020.05

preferences:
55.67 ms | 400 KiB | 5 Q