3v4l.org

run code in 300+ PHP versions simultaneously
<?php $n = 2000; class ClassMetadata { public $assocations; } class Association { public $inverse; public $name; public $joinColumn; public $joinTable; public $cascade; } $association = new Association(); $association->inverse = "foobar"; $association->name = "foobar"; $association->joinColumn = array("baz" => "boing"); $association->joinTable = "foobar"; $association->cascade = array("persist", "remove", "merge"); $cm = new ClassMetadata(); $cm->associations = array($association, $association); $start = microtime(true); for ($i = 0; $i < $n; $i++) { $data = unserialize(serialize($cm)); } echo number_format(microtime(true) - $start, 4) . "\n"; $cm->associations = array((array)$association, (array)$association); $start = microtime(true); for ($i = 0; $i < $n; $i++) { $data = unserialize(serialize($cm)); } echo number_format(microtime(true) - $start, 4) . "\n";

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.0030.02319.29
7.1.70.0000.03216.99
7.1.60.0070.04119.30
7.1.50.0030.02516.84
7.1.00.0100.09322.39
7.0.200.0100.02316.79
7.0.140.0070.09322.12
7.0.120.0030.09722.09
7.0.60.0030.10719.96
7.0.50.0030.06717.90
7.0.40.0200.08720.26
7.0.30.0330.09020.15
7.0.20.0300.09020.26
7.0.10.0000.05720.23
7.0.00.0130.08720.23
5.6.280.0100.10720.91
5.6.210.0000.06720.65
5.6.200.0000.06318.28
5.6.190.0130.07020.61
5.6.180.0230.06720.52
5.6.170.0200.11720.68
5.6.160.0030.07020.61
5.6.150.0000.06718.29
5.6.140.0070.10318.21
5.6.130.0000.07718.18
5.6.120.0070.10321.00
5.6.110.0070.10020.98
5.6.100.0130.10721.05
5.6.90.0170.10021.13
5.6.80.0130.11320.54
5.5.350.0300.11020.42
5.5.340.0070.11017.99
5.5.330.0100.11020.47
5.5.320.0100.07320.28
5.5.310.0270.11320.30
5.5.300.0070.10017.96
5.5.290.0100.11317.95
5.5.280.0100.11720.91
5.5.270.0200.09320.89
5.5.260.0000.08320.77
5.5.250.0070.11320.79
5.5.240.0130.10320.14
5.4.450.0100.06719.25
5.4.440.0070.06719.53
5.4.430.0100.05719.50
5.4.420.0030.09719.24
5.4.410.0130.07019.43
5.4.400.0070.10319.24
5.4.390.0100.10319.07
5.4.380.0070.09718.87
5.4.370.0100.10319.24
5.4.360.0070.06019.24
5.4.350.0070.08019.18
5.4.340.0070.08319.23
5.4.320.0030.08018.85
5.4.310.0100.10719.04
5.4.300.0070.09719.24
5.4.290.0100.10319.20
5.4.280.0070.11719.14
5.4.270.0000.11319.25
5.4.260.0070.10319.18
5.4.250.0000.08318.87
5.4.240.0170.09718.86
5.4.230.0130.07318.84
5.4.220.0000.11719.18
5.4.210.0100.08319.19
5.4.200.0000.11719.13
5.4.190.0000.06319.13
5.4.180.0070.08018.91
5.4.170.0000.09319.13
5.4.160.0100.08718.83
5.4.150.0030.06319.12
5.4.140.0000.06016.55
5.4.130.0000.11016.50
5.4.120.0100.10016.37
5.4.110.0000.08316.54
5.4.100.0000.07016.59
5.4.90.0100.09716.61
5.4.80.0030.06016.56
5.4.70.0000.06016.55
5.4.60.0070.10716.39
5.4.50.0170.09716.38
5.4.40.0100.09016.51
5.4.30.0070.10316.46
5.4.20.0070.07316.27
5.4.10.0030.11016.47
5.4.00.0000.06715.89
5.3.290.0070.05714.80
5.3.280.0100.09314.77
5.3.270.0100.08714.70
5.3.260.0100.07714.67
5.3.250.0000.09314.64
5.3.240.0100.07714.72
5.3.230.0070.08014.51
5.3.220.0070.10314.71
5.3.210.0200.07014.61
5.3.200.0030.09714.61
5.3.190.0070.10714.66
5.3.180.0070.06714.66
5.3.170.0100.10314.63
5.3.160.0070.10714.66
5.3.150.0000.08714.58
5.3.140.0000.09314.65
5.3.130.0100.09314.73
5.3.120.0070.06314.62
5.3.110.0100.10714.58
5.3.100.0100.05314.06
5.3.90.0030.08714.07
5.3.80.0070.05714.11
5.3.70.0070.10714.20
5.3.60.0100.05713.95
5.3.50.0000.06714.03
5.3.40.0030.07313.88
5.3.30.0030.06013.96
5.3.20.0170.09713.79
5.3.10.0000.10313.65
5.3.00.0100.08713.81
5.2.170.0000.05311.26
5.2.160.0070.08011.30
5.2.150.0070.05011.25
5.2.140.0070.09711.35
5.2.130.0030.09011.27
5.2.120.0170.07711.36
5.2.110.0100.09011.44
5.2.100.0030.10011.22
5.2.90.0000.08311.15
5.2.80.0100.09011.40
5.2.70.0070.09711.40
5.2.60.0030.10311.30
5.2.50.0030.06011.27
5.2.40.0030.06311.16
5.2.30.0030.05011.24
5.2.20.0000.05011.12
5.2.10.0000.05711.15
5.2.00.0030.05010.76
5.1.60.0030.04310.21
5.1.50.0070.04010.21
5.1.40.0030.07310.19
5.1.30.0000.04710.49
5.1.20.0030.04310.51
5.1.10.0000.07010.34
5.1.00.0030.08310.36
5.0.50.0100.0778.73
5.0.40.0000.0508.59
5.0.30.0030.0538.49
5.0.20.0000.0438.33
5.0.10.0030.0378.46
5.0.00.0000.0508.30
4.4.90.0000.0208.16
4.4.80.0000.0208.16
4.4.70.0030.0138.16
4.4.60.0030.0138.16
4.4.50.0030.0178.16
4.4.40.0030.0238.16
4.4.30.0000.0178.16
4.4.20.0030.0178.16
4.4.10.0070.0108.16
4.4.00.0030.0378.16
4.3.110.0000.0138.16
4.3.100.0000.0308.16
4.3.90.0000.0178.16
4.3.80.0030.0278.16
4.3.70.0000.0178.16
4.3.60.0000.0138.16
4.3.50.0000.0138.16
4.3.40.0000.0238.16
4.3.30.0030.0138.16
4.3.20.0000.0178.16
4.3.10.0000.0178.16
4.3.00.0000.0138.16

preferences:
38.32 ms | 400 KiB | 5 Q