3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public $secret = 'I actually prefer coding with Go'; public function getClosure() : closure { return function() { return $this->secret; }; } public function dontLeakMyStuff() { return create_function('', 'return $this->secret;'); } } $foo = new Foo(); $closure = $foo->getClosure(); var_dump($closure()); $function = $foo->dontLeakMyStuff(); var_dump($function());

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)
8.3.120.0050.00319.11
8.3.110.0110.00420.94
8.3.100.0090.00024.06
8.3.90.0040.00426.77
8.3.80.0070.00418.34
8.3.70.0130.00716.57
8.3.60.0090.00916.71
8.3.50.0110.01121.91
8.3.40.0150.00618.82
8.3.30.0110.01118.63
8.3.20.0040.00419.16
8.3.10.0040.00421.87
8.3.00.0000.00819.79
8.2.240.0000.00917.14
8.2.230.0040.00722.58
8.2.220.0080.00037.54
8.2.210.0040.00426.77
8.2.200.0030.00618.29
8.2.190.0110.00416.75
8.2.180.0120.00416.88
8.2.170.0110.00422.96
8.2.160.0070.01020.35
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0000.00719.45
8.2.120.0000.00726.35
8.2.110.0000.00920.35
8.2.100.0110.00017.78
8.2.90.0040.00419.22
8.2.80.0040.00417.97
8.2.70.0030.00617.63
8.2.60.0000.00818.05
8.2.50.0050.00318.10
8.2.40.0030.00522.13
8.2.30.0040.00719.27
8.2.20.0080.00018.03
8.2.10.0070.00017.99
8.2.00.0040.00419.51
8.1.300.0090.00918.16
8.1.290.0030.00618.88
8.1.280.0140.00025.92
8.1.270.0050.00323.97
8.1.260.0000.00726.35
8.1.250.0080.00028.09
8.1.240.0060.00323.85
8.1.230.0090.00323.83
8.1.220.0040.00417.74
8.1.210.0050.00318.77
8.1.200.0060.00317.23
8.1.190.0080.00017.35
8.1.180.0080.00018.10
8.1.170.0040.00418.63
8.1.160.0000.00722.15
8.1.150.0040.00422.58
8.1.140.0000.00819.60
8.1.130.0030.00519.07
8.1.120.0000.00717.54
8.1.110.0040.00417.34
8.1.100.0000.00717.52
8.1.90.0040.00417.49
8.1.80.0000.00817.34
8.1.70.0030.00317.44
8.1.60.0040.00417.53
8.1.50.0000.00817.55
8.1.40.0030.00617.42
8.1.30.0000.00817.58
8.1.20.0040.00417.63
8.1.10.0070.00017.61
8.1.00.0000.00817.45
8.0.300.0070.00018.77
8.0.290.0000.00716.63
8.0.280.0000.00818.38
8.0.270.0050.00217.11
8.0.260.0070.00017.21
8.0.250.0070.00016.96
8.0.240.0030.00317.01
8.0.230.0000.00716.84
8.0.220.0030.00616.78
8.0.210.0000.00716.91
8.0.200.0040.00717.01
8.0.190.0030.00616.93
8.0.180.0040.00416.95
8.0.170.0060.00316.84
8.0.160.0080.00016.84
8.0.150.0080.00016.79
8.0.140.0050.00316.77
8.0.130.0060.00013.40
8.0.120.0080.00016.95
8.0.110.0060.00316.85
8.0.100.0000.00716.79
8.0.90.0060.00316.76
8.0.80.0110.00316.92
8.0.70.0040.00416.92
8.0.60.0080.00016.80
8.0.50.0070.00016.85
8.0.30.0070.01217.13
8.0.20.0130.00817.40
8.0.10.0040.00416.92
8.0.00.0100.01016.50
7.4.330.0000.00515.55
7.4.320.0060.00016.57
7.4.300.0030.00316.52
7.4.290.0000.00716.56
7.4.280.0030.00516.59
7.4.270.0030.00316.59
7.4.260.0000.00716.50
7.4.250.0030.00316.61
7.4.240.0080.00016.59
7.4.230.0000.00716.49
7.4.220.0090.00916.61
7.4.210.0080.00716.62
7.4.200.0000.00716.68
7.4.160.0140.00216.65
7.4.150.0070.01117.40
7.4.140.0080.01017.86
7.4.130.0060.01116.57
7.4.120.0120.01016.47
7.4.110.0090.01116.70
7.4.100.0160.00616.48
7.4.90.0090.00916.68
7.4.80.0140.00319.39
7.4.70.0060.01116.36
7.4.60.0090.00916.53
7.4.50.0110.00416.49
7.4.40.0100.01316.62
7.4.30.0120.00916.63
7.4.00.0070.01014.95
7.3.330.0050.00013.20
7.3.320.0050.00013.24
7.3.310.0040.00416.41
7.3.300.0030.00316.42
7.3.290.0070.00016.30
7.3.280.0100.00716.35
7.3.270.0080.01117.40
7.3.260.0130.00716.37
7.3.250.0090.01116.28
7.3.240.0110.00916.45
7.3.230.0120.00616.53
7.3.210.0070.01016.40
7.3.200.0110.00716.56
7.3.190.0080.01116.57
7.3.180.0060.01216.58
7.3.170.0060.01016.56
7.3.160.0090.01016.61
7.3.120.0070.01014.74
7.3.110.0100.01014.72
7.3.100.0000.01215.00
7.3.90.0090.00914.79
7.3.80.0060.00314.89
7.3.70.0030.00614.98
7.3.60.0040.01214.87
7.3.50.0050.00814.93
7.3.40.0040.00814.89
7.3.30.0120.00314.83
7.3.20.0070.00316.71
7.3.10.0050.01016.46
7.3.00.0070.00916.69
7.2.330.0110.00516.48
7.2.320.0080.00816.48
7.2.310.0090.00616.50
7.2.300.0060.01216.76
7.2.290.0060.01116.66
7.2.250.0070.01314.74
7.2.240.0070.01314.57
7.2.230.0110.00415.24
7.2.220.0120.00414.98
7.2.210.0030.01214.99
7.2.200.0030.00915.16
7.2.190.0110.00414.82
7.2.180.0070.00715.20
7.2.170.0000.01615.13
7.2.130.0060.00616.95
7.2.120.0100.00316.90
7.2.110.0000.01116.82
7.2.100.0120.00016.95
7.2.90.0000.01617.13
7.2.80.0030.01217.02
7.2.70.0090.00316.82
7.2.60.0120.00316.94
7.2.50.0060.00917.11
7.2.40.0090.00316.89
7.2.30.0030.01216.84
7.2.20.0040.00716.79
7.2.10.0090.00617.08
7.2.00.0030.01118.03
7.1.330.0090.00615.72
7.1.320.0110.00415.65
7.1.310.0030.01315.50
7.1.300.0060.00615.66
7.1.290.0040.00715.73
7.1.280.0040.00415.64
7.1.270.0050.00515.47
7.1.260.0030.01015.54
7.1.250.0070.00715.64
7.1.200.0060.00315.71
7.1.100.1040.00416.11
7.1.70.0030.00617.22
7.1.60.0030.00717.29
7.1.50.0040.00816.57
7.1.00.0200.05022.62
7.0.200.0840.00014.76
7.0.140.0070.05722.08
7.0.130.0130.05721.95
7.0.120.0070.06322.18
7.0.110.0100.06022.00
7.0.100.0100.05321.97
7.0.90.0170.05021.95
7.0.80.0070.05722.15
7.0.70.0070.05722.15
7.0.60.0070.05722.12
7.0.50.0000.06322.18
7.0.40.0070.05722.14
7.0.30.0130.04722.14
7.0.20.0130.05022.13
7.0.10.0100.05022.01
7.0.00.0170.04721.96
5.6.290.0030.06020.90
5.6.280.0170.05021.07
5.6.270.0030.06320.94
5.6.260.0130.05721.12
5.6.250.0100.06321.13
5.6.240.0200.04320.82
5.6.230.0130.05021.07
5.6.220.0130.07321.00
5.6.210.0070.05720.93
5.6.200.0070.05721.06
5.6.190.0100.05320.92
5.6.180.0100.05321.04
5.6.170.0030.06020.89
5.6.160.0100.06020.88
5.6.150.0100.05320.74
5.6.140.0170.04721.05
5.6.130.0030.05720.87
5.6.120.0170.04720.92
5.6.110.0000.06321.01
5.6.100.0030.06021.07
5.6.90.0070.05320.90
5.6.80.0000.06020.18
5.6.70.0100.05020.26
5.6.60.0130.05020.43
5.6.50.0000.05720.25
5.6.40.0030.05720.24
5.6.30.0100.05020.45
5.6.20.0030.05720.41
5.6.10.0070.05020.39
5.6.00.0130.06020.45

preferences:
31.47 ms | 403 KiB | 5 Q