3v4l.org

run code in 300+ PHP versions simultaneously
<?php class EmptySetter { public $foo = NULL; public function __set($name, $value) {} } class NonEmptySetter { public function __set($name, $value) { $this->{$name} = $value; } } function benchmark($class_name) { $start_time = microtime(TRUE); for ($i = 0; $i < 1; $i++) { $obj = new $class_name(); $obj->foo = 42; echo $obj->foo; } return microtime(TRUE) - $start_time; } printf("EmptySetter: %.2f seconds\n", benchmark('EmptySetter'));

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)
7.2.00.0060.01019.48
7.1.100.0060.00317.97
7.1.70.0040.00417.21
7.1.60.0040.00817.22
7.1.50.0000.01816.88
7.1.00.0000.09322.35
7.0.200.0060.00916.73
7.0.140.0130.06721.95
7.0.60.0170.07319.89
7.0.50.0070.04017.84
7.0.40.0100.08720.15
7.0.30.0300.06720.06
7.0.20.0370.07320.30
7.0.10.0030.04720.04
7.0.00.0030.05320.27
5.6.280.0030.07321.07
5.6.210.0030.07320.48
5.6.200.0130.05018.29
5.6.190.0000.05720.45
5.6.180.4000.04020.48
5.6.170.0300.07720.44
5.6.160.0030.04020.61
5.6.150.0070.08018.16
5.6.140.0100.07018.12
5.6.130.0100.05318.17
5.6.120.0100.08021.02
5.6.110.0130.08020.99
5.6.100.0170.04021.01
5.6.90.0070.07721.11
5.6.80.0130.07320.38
5.5.350.0270.03020.45
5.5.340.0130.05017.98
5.5.330.0070.04020.19
5.5.320.3830.03320.30
5.5.310.0400.06720.27
5.5.300.0070.03717.95
5.5.290.0070.05717.97
5.5.280.0000.04320.86
5.5.270.0070.08720.70
5.5.260.0170.07020.98
5.5.250.0170.07320.60
5.5.240.4170.03720.26
5.4.450.0570.06319.31
5.4.440.0500.05719.59
5.4.430.0070.05719.67
5.4.420.0100.05319.52
5.4.410.0070.07319.42
5.4.400.0070.05318.81
5.4.390.0170.04318.61
5.4.380.0170.06318.84
5.4.370.0230.05018.70
5.4.360.0300.04718.80
5.4.350.0230.04718.73
5.4.340.0230.05018.84
5.4.320.0030.04612.51
5.4.310.0090.04012.50
5.4.300.0050.04212.51
5.4.290.0050.05512.51
5.4.280.0040.03712.40
5.4.270.0070.06318.93
5.4.260.0170.05718.93
5.4.250.0100.05318.93
5.4.240.0070.06318.92
5.4.230.0270.05718.75
5.4.220.0100.05719.08
5.4.210.0170.05318.94
5.4.200.0100.05318.98
5.4.190.0230.05018.93
5.4.180.0030.06318.83
5.4.170.0130.07018.64
5.4.160.0100.07718.81
5.4.150.0130.06018.61
5.4.140.0070.05316.63
5.4.130.0030.06716.50
5.4.120.0030.06316.45
5.4.110.0100.05716.55
5.4.100.0170.04316.61
5.4.90.0130.05316.46
5.4.80.0130.06316.49
5.4.70.0200.04316.46
5.4.60.0270.06016.41
5.4.50.0170.06716.58
5.4.40.0230.04716.29
5.4.30.0070.06716.35
5.4.20.0130.05316.50
5.4.10.0000.07716.40
5.4.00.0070.06315.93
5.3.290.0100.04712.80
5.3.280.0070.06314.69
5.3.270.0130.04714.64
5.3.260.0130.07714.63
5.3.250.0130.06714.69
5.3.240.0070.06314.68
5.3.230.0100.05314.61
5.3.220.0100.07014.71
5.3.210.0230.04714.73
5.3.200.0130.05714.66
5.3.190.0200.05714.70
5.3.180.0170.05014.66
5.3.170.0070.07314.48
5.3.160.0100.06014.75
5.3.150.0170.06014.57
5.3.140.0130.07314.65
5.3.130.0100.06014.77
5.3.120.0130.07014.57
5.3.110.0300.05714.54
5.3.100.0330.04314.05
5.3.90.0130.04314.20
5.3.80.0070.07314.11
5.3.70.0170.05014.25
5.3.60.0000.06313.83
5.3.50.0170.05713.97
5.3.40.0130.04314.14
5.3.30.0000.07313.82
5.3.20.0170.05713.79
5.3.10.0130.06313.66
5.3.00.0030.07713.66
5.2.170.0030.05011.13
5.2.160.0130.05010.98
5.2.150.0030.05011.14
5.2.140.0130.03711.10
5.2.130.0030.06011.18
5.2.120.0130.05011.20
5.2.110.0170.03711.18
5.2.100.0170.03011.09
5.2.90.0070.05311.09
5.2.80.0030.05011.17
5.2.70.0100.05011.08
5.2.60.0170.04310.90
5.2.50.0100.04311.11
5.2.40.0070.04711.09
5.2.30.0130.05011.14
5.2.20.0030.05710.96
5.2.10.0100.04010.86
5.2.00.0070.04310.87
5.1.60.0030.0509.93
5.1.50.0000.05310.13
5.1.40.0070.04010.09
5.1.30.0030.03710.37
5.1.20.0030.04010.38
5.1.10.0130.03010.11
5.1.00.0030.05010.09
5.0.50.0070.0438.56
5.0.40.0030.0338.41
5.0.30.0070.0538.33
5.0.20.0000.0408.31
5.0.10.0100.0338.27
5.0.00.0000.0508.16
4.4.90.0030.0276.85
4.4.80.0000.0306.85
4.4.70.0030.0336.85
4.4.60.0000.0306.85
4.4.50.0000.0236.85
4.4.40.0000.0406.85
4.4.30.0000.0236.85
4.4.20.0030.0336.85
4.4.10.0030.0236.85
4.4.00.0030.0376.85
4.3.110.0130.0336.85
4.3.100.0030.0276.85
4.3.90.0070.0276.85
4.3.80.0100.0276.85
4.3.70.0070.0206.85
4.3.60.0030.0206.85
4.3.50.0070.0176.85
4.3.40.0030.0336.85
4.3.30.0070.0206.85
4.3.20.0000.0236.85
4.3.10.0000.0306.85
4.3.00.0130.0177.37

preferences:
36.88 ms | 400 KiB | 5 Q