3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tpl = "The side bar{l:{khalid}} s a Cheatsheet,{l:{test}} full Reference, and Help. You can also Save & Share with the Community, and {{kaitbellahs}}view patterns you{{eu mesmo}} create or favorite in My Patterns. Global #kha; print #kha; Global #main; print #main-['kha']; Global #main; print #main-['kha']; Global #main; print #main-['kha']; Global #kha1; print #1kha; Global #1kha; print #kha1; <!DOCTYPE html> <html <?php if( <?php GLOBAL #main;print #main->conf['amp']; ?> ){ print \"amp\"; } ?> lang=\" <?php GLOBAL #main;print #main->lng['lng']; ?> \"> <head> Explore results with the Tools below. Replace & List output custom results. Details lists capture groups. Explain d"; //$globals = array(); $tpl = preg_replace("/if\( \<\?php (.*?)GLOBAL.*?\;print (.*?); \?\>+/im", "if(\$1", $tpl); //$globals = array_unique(array_map("StrToLower", $globals[0])); var_dump($tpl);

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.0120.00918.52
8.3.50.0070.00716.37
8.3.40.0070.00718.69
8.3.30.0150.00018.79
8.3.20.0030.00618.98
8.3.10.0040.00419.20
8.3.00.0050.00317.80
8.2.180.0130.01016.63
8.2.170.0070.00722.96
8.2.160.0110.00419.04
8.2.150.0000.00724.18
8.2.140.0080.00024.66
8.2.130.0080.00019.77
8.2.120.0080.00026.35
8.2.110.0030.00621.13
8.2.100.0090.00319.88
8.2.90.0040.00417.63
8.2.80.0050.00318.91
8.2.70.0030.00517.90
8.2.60.0000.00817.80
8.2.50.0030.00518.10
8.2.40.0000.00821.05
8.2.30.0030.00519.41
8.2.20.0030.00518.04
8.2.10.0040.00418.10
8.2.00.0030.00319.47
8.1.270.0080.00024.01
8.1.260.0070.00026.35
8.1.250.0050.00328.09
8.1.240.0000.00919.36
8.1.230.0070.00319.16
8.1.220.0030.00618.69
8.1.210.0040.00418.77
8.1.200.0040.00417.48
8.1.190.0000.01117.22
8.1.180.0040.00418.10
8.1.170.0000.00818.73
8.1.160.0000.00718.87
8.1.150.0040.00418.81
8.1.140.0080.00017.69
8.1.130.0030.00318.99
8.1.120.0030.00317.55
8.1.110.0000.00717.53
8.1.100.0080.00017.59
8.1.90.0040.00417.52
8.1.80.0050.00317.57
8.1.70.0030.00317.53
8.1.60.0030.00717.62
8.1.50.0040.00417.63
8.1.40.0040.00417.70
8.1.30.0060.00617.60
8.1.20.0000.00817.74
8.1.10.0030.00617.64
8.1.00.0000.00717.55
8.0.300.0000.00718.77
8.0.290.0000.00816.88
8.0.280.0030.00318.35
8.0.270.0040.00417.28
8.0.260.0040.00418.93
8.0.250.0000.00717.06
8.0.240.0000.00816.95
8.0.230.0070.00016.93
8.0.220.0070.00016.97
8.0.210.0070.00016.96
8.0.200.0050.00316.94
8.0.190.0070.00017.07
8.0.180.0040.00417.03
8.0.170.0050.00316.97
8.0.160.0000.00717.05
8.0.150.0030.00516.91
8.0.140.0000.00716.95
8.0.130.0030.00313.41
8.0.120.0050.00216.84
8.0.110.0020.00516.92
8.0.100.0030.00616.80
8.0.90.0000.00716.88
8.0.80.0070.00716.95
8.0.70.0040.00417.03
8.0.60.0080.00017.04
8.0.50.0020.00517.10
8.0.30.0070.01117.20
8.0.20.0140.00817.40
8.0.10.0030.00516.99
8.0.00.0090.01216.79
7.4.330.0030.00315.55
7.4.320.0030.00316.68
7.4.300.0030.00316.75
7.4.290.0000.00716.64
7.4.280.0050.00316.73
7.4.270.0030.00316.69
7.4.260.0040.00416.74
7.4.250.0030.00316.65
7.4.240.0000.00716.67
7.4.230.0030.00316.68
7.4.220.0040.00416.48
7.4.210.0080.00716.57
7.4.200.0020.00516.51
7.4.160.0110.00516.60
7.4.140.0120.00817.86
7.4.130.0070.01316.61
7.4.120.0110.01016.59
7.4.110.0070.01016.82
7.4.100.0040.01516.58
7.4.90.0100.01116.71
7.4.80.0100.00719.39
7.4.70.0110.00616.60
7.4.60.0100.00916.57
7.4.50.0070.00216.49
7.4.40.0120.00616.66
7.4.00.0090.00814.83
7.3.330.0000.00613.09
7.3.320.0000.00613.10
7.3.310.0070.00016.30
7.3.300.0000.00716.25
7.3.290.0070.00016.29
7.3.280.0120.00616.30
7.3.260.0110.00616.53
7.3.240.0070.01016.41
7.3.230.0100.00716.50
7.3.210.0090.00916.27
7.3.200.0120.00416.66
7.3.190.0160.00516.77
7.3.180.0030.01216.46
7.3.170.0080.00816.56
7.3.160.0110.00616.38
7.3.120.0070.01115.10
7.3.110.0000.01814.41
7.3.100.0100.00714.79
7.3.90.0120.00614.80
7.3.80.0030.01015.07
7.3.70.0000.01514.95
7.3.60.0100.00314.67
7.3.50.0130.00314.98
7.3.40.0040.01214.94
7.3.30.0030.01414.82
7.3.20.0030.00616.67
7.3.10.0030.00616.31
7.3.00.0040.01216.84
7.2.330.0040.01516.71
7.2.320.0140.00916.72
7.2.310.0160.00316.79
7.2.300.0110.00616.82
7.2.290.0030.01316.64
7.2.250.0160.00314.87
7.2.240.0040.01415.18
7.2.230.0070.01314.78
7.2.220.0060.00615.18
7.2.210.0060.00615.09
7.2.200.0040.00915.27
7.2.190.0080.00715.13
7.2.180.0080.00314.89
7.2.170.0040.01114.98
7.2.60.0400.00714.80
7.2.50.0870.01114.66
7.2.40.0190.00715.33
7.2.31.0810.01115.47
7.2.20.5110.01315.40
7.2.10.1450.01215.50
7.2.00.9140.01015.39
7.1.330.0100.00315.85
7.1.320.0030.01216.04
7.1.310.0070.00715.76
7.1.300.0100.00715.77
7.1.290.0030.01015.53
7.1.280.0090.00015.71
7.1.270.0030.01015.92
7.1.260.0080.00615.77
7.1.200.0060.00616.04
7.1.170.0130.01213.86
7.1.160.0170.01417.20
7.1.150.8510.01716.90
7.1.140.4800.00917.11
7.1.130.0160.01117.11
7.1.120.9710.01116.62
7.1.110.9010.01216.37
7.1.100.7080.00916.14
7.1.90.9220.01115.95
7.1.80.7060.00916.43
7.1.70.8910.01415.36
7.1.60.9880.01933.52
7.1.51.3710.02033.17
7.1.41.4910.01432.68
7.1.31.0840.01932.89
7.1.20.9290.02033.01
7.1.10.9010.01514.86
7.1.00.8680.01514.91

preferences:
61.6 ms | 400 KiB | 5 Q