3v4l.org

run code in 300+ PHP versions simultaneously
<?php // HEAD $element = []; $text = $element['#text']; var_dump($text); // Using ?? $element = []; $text = $element['#text'] ?? ''; var_dump($text); // Using string cast no #text $element = []; $text = (string) $element['#text']; var_dump($text); // Using string cast with #text $element = ['#text' => NULL]; $text = (string) $element['#text']; var_dump($text);

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.140.0130.00416.53
8.3.130.0330.01116.56
8.3.120.0310.00616.59
8.3.110.0300.00816.47
8.3.100.0330.00816.43
8.3.90.0320.00916.58
8.3.80.0340.00616.51
8.3.70.0330.00516.50
8.3.60.0320.00716.47
8.3.50.0350.00416.44
8.3.40.0210.00917.34
8.3.30.0270.00517.35
8.3.20.0280.00317.25
8.3.10.0250.00417.37
8.3.00.0200.00717.26
8.2.250.0250.00816.54
8.2.240.0280.00916.49
8.2.230.0260.00816.35
8.2.220.0270.00716.33
8.2.210.0230.00916.66
8.2.200.0300.00716.47
8.2.190.0280.00616.55
8.2.180.0250.00416.69
8.2.170.0290.00317.71
8.2.160.0270.00817.56
8.2.150.0290.00717.50
8.2.140.0260.01117.48
8.2.130.0310.00417.37
8.2.120.0260.00817.33
8.2.110.0320.00517.45
8.2.100.0260.00717.48
8.2.90.0250.00917.58
8.2.80.0290.00517.39
8.2.70.0240.00917.39
8.2.60.0240.01017.58
8.2.50.0240.00917.48
8.2.40.0240.00917.44
8.2.30.0230.00817.37
8.2.20.0260.00417.48
8.2.10.0270.00317.49
8.2.00.0200.00917.46
8.1.300.0240.00916.20
8.1.290.0270.00616.21
8.1.280.0240.00816.19
8.1.270.0390.00417.20
8.1.260.0210.00717.50
8.1.250.0300.00317.19
8.1.240.0280.00717.14
8.1.230.0290.00817.20
8.1.220.0280.00717.17
8.1.210.0240.00417.09
8.1.200.0180.00617.11
8.1.190.0180.00517.03
8.1.180.0230.00416.95
8.1.170.0240.00517.00
8.1.160.0230.00917.04
8.1.150.0220.00917.05
8.1.140.0240.00816.96
8.1.130.0240.00617.11
8.1.120.0250.00617.02
8.1.110.0240.00817.09
8.1.100.0230.00817.11
8.1.90.0230.00617.13
8.1.80.0200.00517.16
8.1.70.0210.00617.09
8.1.60.0270.00717.35
8.1.50.0310.00417.09
8.1.40.0280.00417.28
8.1.30.0250.01017.28
8.1.20.0250.00717.21
8.1.10.0230.00517.19
8.1.00.0190.00817.09

preferences:
35.48 ms | 403 KiB | 5 Q