3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ZeroDayTechnique { public function key($action = 'get', $value = null) { static $hidden = []; switch ($action) { case 'get': return $hidden[spl_object_hash($this)]; case 'set': $hidden[spl_object_hash($this)] = $value; break; default: throw new Exception('Wut in da hell'); } } } $x = new ZeroDayTechnique; $not_x = new ZeroDayTechnique; $x->key('set', random_bytes(32)); var_dump(bin2hex($x->key('get'))); $not_x->key('set', random_bytes(32)); var_dump(bin2hex($x->key('get'))); var_dump(bin2hex($not_x->key('get'))); var_dump($x);

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.4.00.0100.01015.01
7.3.120.0080.00814.81
7.3.110.0070.01014.64
7.3.100.0030.00614.75
7.3.90.0000.00814.89
7.3.80.0130.00314.60
7.3.70.0000.01414.83
7.3.60.0040.01114.68
7.3.50.0030.01014.89
7.3.40.0120.00414.77
7.3.30.0060.00914.90
7.3.20.0090.00616.56
7.3.10.0030.01016.74
7.3.00.0140.00316.77
7.2.250.0060.01114.60
7.2.240.0090.00914.80
7.2.230.0080.00815.11
7.2.220.0040.01215.09
7.2.210.0090.00915.22
7.2.200.0070.00314.69
7.2.190.0120.00415.00
7.2.180.0110.00414.85
7.2.170.0100.00315.17
7.2.60.0100.00316.68
7.2.00.0070.00719.17
7.1.330.0030.01015.55
7.1.320.0090.00615.79
7.1.310.0110.00015.79
7.1.300.0120.00315.82
7.1.290.0060.01015.97
7.1.280.0040.01415.77
7.1.270.0040.01115.80
7.1.260.0100.00315.83
7.1.200.0030.00715.61
7.1.100.0070.00718.19
7.1.70.0070.00717.18
7.1.60.0070.01719.50
7.1.50.0030.01816.90
7.1.00.0030.07722.57
7.0.200.0060.00316.57
7.0.60.0070.08319.98
7.0.50.0070.06017.92
7.0.40.0070.04020.02
7.0.30.0300.07320.25
7.0.20.0270.06320.07
7.0.10.0330.04320.19
7.0.00.0030.09020.22
5.6.280.0000.03720.83
5.6.210.0030.07320.53
5.6.200.0130.07718.29
5.6.190.0100.07320.39
5.6.180.0270.06720.56
5.6.170.0200.05320.44
5.6.160.0130.06720.49
5.6.150.0030.07018.22
5.6.140.0100.05318.18
5.6.130.0130.07718.18
5.6.120.0070.05320.99
5.6.110.0100.06720.96
5.6.100.0030.07020.99
5.6.90.0000.07720.88
5.6.80.0100.07720.53
5.6.70.0170.03320.50
5.5.350.0300.06320.41
5.5.340.0100.07718.04
5.5.330.0100.07720.19
5.5.320.0330.05320.44
5.5.310.0230.08020.41
5.5.300.0130.06718.08
5.5.290.0070.07718.04
5.5.280.0170.07720.88
5.5.270.0000.04320.88
5.5.260.0230.06020.96
5.5.250.0100.07720.71
5.5.240.0230.04720.27
5.4.450.0900.06319.59
5.4.440.0870.05019.46
5.4.430.0600.06019.19
5.4.420.1030.04719.58
5.4.410.0800.05319.33
5.4.400.0830.05019.27
5.4.390.0800.06319.36
5.4.380.0770.06719.12
5.4.370.1030.05018.86
5.4.360.0870.04718.84
5.4.350.0800.05018.98
5.4.340.0770.05319.08
5.4.320.0770.05319.02
5.4.310.0730.06019.25
5.4.300.0800.05319.23
5.4.290.0800.04718.86
5.4.280.0730.05319.25
5.4.270.0900.04319.14
5.4.260.0770.05018.83
5.4.250.0730.06319.38
5.4.240.0800.05019.07
5.4.230.0930.05319.25
5.4.220.0930.07318.84
5.4.210.0770.05319.25
5.4.200.0700.06019.26
5.4.190.0830.05719.04
5.4.180.0830.04719.25
5.4.170.0830.04719.23
5.4.160.0970.06019.03
5.4.150.0570.06018.84
5.4.140.0870.05716.39
5.4.130.0570.05016.29
5.4.120.0770.04716.49
5.4.110.0730.05316.59
5.4.100.0770.05016.62
5.4.90.0800.05716.51
5.4.80.0800.05716.27
5.4.70.0770.06716.55
5.4.60.0730.04016.50
5.4.50.0730.03716.62
5.4.40.0600.05316.57
5.4.30.0730.04016.55
5.4.20.0600.05016.45
5.4.10.0770.05016.49
5.4.00.0830.04715.95

preferences:
37.08 ms | 401 KiB | 5 Q