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_z->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.0080.01115.05
7.3.120.0070.01214.91
7.3.110.0080.01014.93
7.3.100.0050.00915.09
7.3.90.0110.00414.97
7.3.80.0050.01014.94
7.3.70.0020.00914.71
7.3.60.0100.00514.68
7.3.50.0090.00414.69
7.3.40.0070.00314.79
7.3.30.0030.01214.84
7.3.20.0050.01016.73
7.3.10.0080.01016.66
7.3.00.0040.01316.76
7.2.250.0100.00714.91
7.2.240.0080.00814.72
7.2.230.0090.00514.97
7.2.220.0100.00414.99
7.2.210.0020.01314.70
7.2.200.0080.00514.89
7.2.190.0060.00815.06
7.2.180.0050.01115.03
7.2.170.0030.01014.88
7.2.00.0030.01019.30
7.1.330.0050.00815.71
7.1.320.0030.00915.92
7.1.310.0060.00815.65
7.1.300.0050.01015.88
7.1.290.0050.00915.72
7.1.280.0060.00915.91
7.1.270.0100.00515.69
7.1.260.0050.00915.75
7.1.100.0110.00318.24
7.1.70.0100.00317.19
7.1.60.0070.01819.50
7.1.50.0030.01616.95
7.1.00.0000.08022.30
7.0.200.0030.00616.85
7.0.60.0030.07019.95
7.0.50.0030.08717.90
7.0.40.0030.09720.14
7.0.30.0200.05720.08
7.0.20.0130.04720.19
7.0.10.0170.05020.12
7.0.00.0130.08020.05
5.6.280.0130.02721.08
5.6.210.0170.07320.73
5.6.200.0070.05318.14
5.6.190.0030.07720.46
5.6.180.0330.07320.49
5.6.170.0200.05320.47
5.6.160.0100.08020.46
5.6.150.0100.04318.19
5.6.140.0070.08018.18
5.6.130.0070.06018.15
5.6.120.0030.04321.13
5.6.110.0030.08020.98
5.6.100.0030.04020.98
5.6.90.0030.09020.98
5.6.80.0100.07320.54
5.6.70.0470.05720.54
5.5.350.0230.04020.47
5.5.340.0000.05717.97
5.5.330.0030.08320.35
5.5.320.0200.04720.57
5.5.310.0170.03720.36
5.5.300.0030.08017.97
5.5.290.0000.04717.98
5.5.280.0070.03720.76
5.5.270.0030.08320.73
5.5.260.0070.06320.77
5.5.250.0030.04320.62
5.5.240.0130.04020.19
5.4.450.0770.07719.55
5.4.440.0670.07719.42
5.4.430.0530.05319.54
5.4.420.0070.06319.42
5.4.410.0030.06719.34
5.4.400.0800.05719.21
5.4.390.0430.06319.12
5.4.380.0630.05718.98
5.4.370.0600.05319.05
5.4.360.0770.05719.11
5.4.350.0600.05719.09
5.4.340.0430.04319.16
5.4.320.0130.05019.14
5.4.310.0270.06319.27
5.4.300.0630.06019.01
5.4.290.0370.05018.84
5.4.280.0100.05319.09
5.4.270.0370.05719.08
5.4.260.0570.06019.05
5.4.250.0530.05019.01
5.4.240.0630.06019.09
5.4.230.0930.04719.00
5.4.220.0730.05319.14
5.4.210.0700.04319.00
5.4.200.0730.05019.34
5.4.190.0870.04719.23
5.4.180.0700.05319.09
5.4.170.0800.05319.25
5.4.160.1000.05018.84
5.4.150.0800.05719.12
5.4.140.0870.05316.65
5.4.130.0830.05016.45
5.4.120.1070.03716.36
5.4.110.0800.05316.19
5.4.100.0930.04716.25
5.4.90.0930.04716.52
5.4.80.0870.05716.24
5.4.70.0870.07016.41
5.4.60.0970.07016.39
5.4.50.0830.06016.57
5.4.40.0930.04316.59
5.4.30.0800.05016.49
5.4.20.0870.04316.62
5.4.10.0870.05016.54
5.4.00.0700.06015.80

preferences:
31.47 ms | 401 KiB | 5 Q