3v4l.org

run code in 300+ PHP versions simultaneously
<?php function pr($a) { echo $a . PHP_EOL; } class ModuleConfig { const PAYMENT_GATEWAY_MOLLIE_KEY = 'deadbeef'; } $paymentGateway = 'MOLLIE'; $gatewayKey = 'ModuleConfig::PAYMENT_GATEWAY_' . strtoupper($paymentGateway) . '_KEY'; $foo = ModuleConfig::PAYMENT_GATEWAY_MOLLIE_KEY; pr($foo); // prints the key pr($gatewayKey); // prints ModuleConfig::PAYMENT_GATEWAY_MOLLIE_KEY pr(constant($gatewayKey)); // tells me it cannot find a constant ModuleConfig::PAYMENT_GATEWAY_MOLLIE_KEY

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.60.0150.00016.38
8.3.50.0100.01016.15
8.3.40.0120.00618.57
8.3.30.0090.01218.70
8.3.20.0080.00020.34
8.3.10.0050.00322.09
8.3.00.0060.00323.48
8.2.180.0150.00025.92
8.2.170.0110.00422.96
8.2.160.0100.01020.47
8.2.150.0070.00024.18
8.2.140.0090.00924.66
8.2.130.0110.00419.39
8.2.120.0110.00726.35
8.2.110.0060.00322.02
8.2.100.0070.00417.78
8.2.90.0080.00017.75
8.2.80.0000.00818.61
8.2.70.0040.00417.50
8.2.60.0030.00617.93
8.2.50.0000.00918.07
8.2.40.0040.00419.96
8.2.30.0070.00018.03
8.2.20.0030.00618.16
8.2.10.0030.00518.07
8.2.00.0040.00418.17
8.1.280.0150.00325.92
8.1.270.0040.00422.06
8.1.260.0100.00326.35
8.1.250.0080.00028.09
8.1.240.0060.00318.90
8.1.230.0080.00317.64
8.1.220.0000.00717.74
8.1.210.0040.00418.77
8.1.200.0080.00017.36
8.1.190.0060.00317.23
8.1.180.0040.00418.10
8.1.170.0030.00718.64
8.1.160.0000.00718.95
8.1.150.0040.00420.00
8.1.140.0030.00719.58
8.1.130.0050.00220.80
8.1.120.0000.00817.47
8.1.110.0040.00417.38
8.1.100.0050.00217.49
8.1.90.0070.00017.43
8.1.80.0040.00417.52
8.1.70.0000.00717.49
8.1.60.0040.00417.59
8.1.50.0040.00417.38
8.1.40.0080.00017.41
8.1.30.0000.00817.66
8.1.20.0040.00417.54
8.1.10.0000.00717.41
8.1.00.0040.00417.41
8.0.300.0000.00718.77
8.0.290.0050.00316.63
8.0.280.0030.00318.33
8.0.270.0040.00417.13
8.0.260.0030.00318.32
8.0.250.0030.00516.96
8.0.240.0040.00416.83
8.0.230.0000.01016.91
8.0.220.0000.00716.90
8.0.210.0030.00316.90
8.0.200.0000.00817.01
8.0.190.0100.00016.97
8.0.180.0040.00416.93
8.0.170.0070.00016.90
8.0.160.0040.00416.82
8.0.150.0070.00016.90
8.0.140.0000.00816.86
8.0.130.0030.00313.38
8.0.120.0070.00016.84
8.0.110.0000.00816.79
8.0.100.0000.00716.93
8.0.90.0050.00216.84
8.0.80.0060.00916.85
8.0.70.0000.00716.89
8.0.60.0000.00716.74
8.0.50.0030.00516.80
8.0.30.0100.01016.96
8.0.20.0130.00617.40
8.0.10.0040.00416.89
8.0.00.0070.01116.57
7.4.330.0000.00515.55
7.4.320.0030.00316.39
7.4.300.0060.00016.36
7.4.290.0040.00416.54
7.4.280.0070.00016.61
7.4.270.0000.00616.49
7.4.260.0000.00716.48
7.4.250.0030.00516.55
7.4.240.0000.00716.59
7.4.230.0030.00316.48
7.4.220.0180.00316.44
7.4.210.0100.00316.55
7.4.200.0030.00316.68
7.4.160.0080.01016.45
7.4.150.0110.00617.40
7.4.140.0120.00717.86
7.4.130.0110.00716.66
7.4.120.0110.00716.55
7.4.110.0120.00616.58
7.4.100.0100.00616.62
7.4.90.0130.00316.47
7.4.80.0100.01319.39
7.4.70.0100.00716.66
7.4.60.0030.01316.45
7.4.50.0060.00716.54
7.4.40.0130.00316.43
7.4.30.0060.01216.30
7.4.00.0060.01215.22
7.3.330.0000.00513.08
7.3.320.0060.00013.29
7.3.310.0070.00016.34
7.3.300.0000.00716.34
7.3.290.0110.00416.28
7.3.280.0070.01016.29
7.3.270.0030.01317.40
7.3.260.0070.01516.40
7.3.250.0100.00916.47
7.3.240.0100.00716.51
7.3.230.0120.00616.24
7.3.210.0060.01216.36
7.3.200.0030.01216.42
7.3.190.0060.00916.32
7.3.180.0100.01016.38
7.3.170.0130.01216.23
7.3.160.0040.01216.52
7.2.330.0060.01116.30
7.2.320.0080.00916.54
7.2.310.0090.00916.70
7.2.300.0100.01016.74
7.2.290.0080.00816.44
7.2.60.0040.00916.85
7.1.200.0030.00715.78
7.1.100.0090.00318.10
7.1.90.0090.00318.01
7.1.80.0090.00318.07
7.1.70.0000.01317.15
7.1.60.0230.01234.75
7.1.50.0190.01034.72
7.1.40.0130.01334.27
7.1.30.0140.01434.42
7.1.20.0130.01334.39
7.1.10.0060.00616.58
7.1.00.0030.01016.36
7.0.240.0040.00817.79
7.0.230.0070.01017.71
7.0.220.0030.01217.50
7.0.210.0070.00716.63
7.0.200.0000.01316.90
7.0.190.0030.01216.64
7.0.180.0030.01016.11
7.0.170.0030.01016.19
7.0.160.0060.00616.14
7.0.150.0000.01316.27
7.0.140.0060.01216.25
7.0.130.0000.01316.52
7.0.120.0060.00616.48
7.0.110.0030.00916.20
7.0.100.0000.01316.23
7.0.90.0060.00616.48
7.0.80.0090.00316.39
7.0.70.0000.01216.23
7.0.60.0030.01016.23
7.0.50.0040.00916.30
7.0.40.0100.00316.55
7.0.30.0030.01016.44
7.0.20.0040.00816.33
7.0.10.0060.00616.31
7.0.00.0080.00416.57

preferences:
64.81 ms | 400 KiB | 5 Q