3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $schema = <<<'HERE' { "properties": { "foo": {"$ref": "#"} }, "additionalProperties": false } HERE; $schema = json_decode($schema); // unset the ref unset($schema->properties->foo); // replace it with a closure that returns the schema when accessed. $schema->properties->foo = function () use ($schema) { return $schema; }; // If you find a closure, it's a lazy proxy. Execute it to get the value. $ref = $schema->properties->foo; $referencedValue = $ref(); // You would stop recursing if 1.) you run out of nested data or 2.) you reach the max depth. var_dump($referencedValue->properties);
based on 19sPU

Here you find the average performance (time & memory) of each version. A greyed out version indicates it didn't complete successfully (based on exit-code).
Note: hhvm uses a JIT which only kicks in after a few runs. Since we run scripts only once, hhvm always runs slower.

VersionSystem time (s)User time (s)Memory (MiB)
7.2.00.0060.00319.49
7.1.100.0030.00818.00
7.1.70.0060.00617.05
7.1.60.0090.00619.61
7.1.50.0100.01017.05
7.1.00.0030.07722.45
7.0.200.0030.00716.40
7.0.60.0000.03321.59
7.0.50.0000.04317.94
7.0.40.0200.08020.14
7.0.30.0330.07720.15
7.0.20.0200.04020.16
7.0.10.0100.08720.23
7.0.00.0070.04020.18
5.6.280.0000.07721.02
5.6.210.0200.06320.56
5.6.200.0070.07718.19
5.6.190.0200.07720.77
5.6.180.0400.06720.48
5.6.170.0270.08320.47
5.6.160.0100.08020.55
5.6.150.0070.05318.21
5.6.140.0070.04718.18
5.6.130.0070.05718.28
5.6.120.0070.08321.14
5.6.110.0200.06320.96
5.6.100.0100.05720.98
5.6.90.0070.06721.03
5.6.80.0170.07020.51
5.5.350.4200.04320.38
5.5.340.0070.05318.07
5.5.330.0130.07720.13
5.5.320.0270.04320.56
5.5.310.0330.07020.25
5.5.300.0030.04017.95
5.5.290.0030.07018.08
5.5.280.0100.04320.73
5.5.270.0170.06020.64
5.5.260.0070.05720.96
5.5.250.0070.08320.78
5.5.240.0070.07720.18
5.4.450.0630.05719.59
5.4.440.0130.05319.27
5.4.430.0430.05719.52
5.4.420.0200.05019.43
5.4.410.0500.06719.35
5.4.400.0800.05019.11
5.4.390.0670.05719.29
5.4.380.0700.05319.11
5.4.370.0630.05019.27
5.4.360.0170.05019.18
5.4.350.0600.05018.95
5.4.340.0200.04719.29
5.4.320.0600.05719.20
5.4.310.0600.04319.16
5.4.300.0530.05319.24
5.4.290.0770.04019.15
5.4.280.0670.06019.16
5.4.270.0570.05719.26
5.4.260.0600.05319.20
5.4.250.0530.05719.03
5.4.240.0600.04319.24
5.4.230.0630.04319.23
5.4.220.0700.05719.00
5.4.210.0600.05319.14
5.4.200.0600.07019.23
5.4.190.0300.05319.15
5.4.180.0070.06019.19
5.4.170.0130.05318.92
5.4.160.0200.04719.19
5.4.150.0070.06019.02
5.4.140.0170.05316.51
5.4.130.0230.04316.38
5.4.120.0130.05016.41
5.3.290.0570.07014.67
5.3.280.0400.05714.61
5.3.270.0070.06014.61
5.3.260.0200.05014.63
5.3.250.0130.05314.63
5.3.240.0170.05014.65
5.3.230.0130.05314.76
5.3.220.0170.04714.55