3v4l.org

run code in 300+ PHP versions simultaneously
<?php ob_start(); ?> flarg blarg dlarg <!-- BEGIN DYNAMIC BLOCK: guide_greeting --> filler content <!-- END DYNAMIC BLOCK: guide_greeting --> flarg blarg dlarg <?php $content = ob_get_clean(); function getDyanmicBlockContent($content, $tag) { $boundaries = (object) [ 'start' => sprintf('<!-- BEGIN DYNAMIC BLOCK: %s -->', $tag), 'end' => sprintf('<!-- END DYNAMIC BLOCK: %s -->', $tag), ]; $results = (object) [ 'start' => stripos($content, $boundaries->start), 'end' => stripos($content, $boundaries->end), ]; if ($results->start === false || $results->end === false || $results->start > $results->end) { return null; } $results->start -= strlen($boundaries->start); $substr = substr($content, $results->start, $results->end); return $substr; } var_dump( getDyanmicBlockContent($content, 'guide_greeting') );

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.0110.00718.32
8.3.50.0110.00317.99
8.3.40.0100.00618.79
8.3.30.0120.00318.84
8.3.20.0080.00019.19
8.3.10.0000.00821.73
8.3.00.0080.00023.61
8.2.180.0120.00918.41
8.2.170.0110.00722.96
8.2.160.0090.00619.26
8.2.150.0000.00725.66
8.2.140.0050.00324.66
8.2.130.0040.00418.09
8.2.120.0030.00526.35
8.2.110.0060.00322.07
8.2.100.0090.00317.97
8.2.90.0000.00919.36
8.2.80.0000.00817.97
8.2.70.0080.00017.93
8.2.60.0000.00817.93
8.2.50.0060.00318.10
8.2.40.0080.00019.51
8.2.30.0020.00519.32
8.2.20.0060.00318.00
8.2.10.0050.00219.46
8.2.00.0020.00519.47
8.1.280.0120.00425.92
8.1.270.0080.00022.11
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0100.00022.11
8.1.230.0040.00719.13
8.1.220.0030.00517.79
8.1.210.0040.00418.77
8.1.200.0060.00317.35
8.1.190.0030.00617.22
8.1.180.0040.00418.10
8.1.170.0060.00318.68
8.1.160.0070.00318.85
8.1.150.0040.00418.89
8.1.140.0000.00717.70
8.1.130.0000.00718.91
8.1.120.0000.00817.41
8.1.110.0000.00817.39
8.1.100.0000.00817.50
8.1.90.0000.00817.46
8.1.80.0030.00617.48
8.1.70.0030.00317.37
8.1.60.0000.01017.60
8.1.50.0080.00017.51
8.1.40.0050.00317.41
8.1.30.0080.00017.48
8.1.20.0000.00717.67
8.1.10.0030.00517.46
8.1.00.0000.00817.53
8.0.300.0040.00418.77
8.0.290.0040.00416.75
8.0.280.0000.00718.32
8.0.270.0040.00417.25
8.0.260.0000.00617.18
8.0.250.0000.00716.97
8.0.240.0000.00616.92
8.0.230.0040.00416.85
8.0.220.0000.00716.80
8.0.210.0000.00716.91
8.0.200.0030.00316.97
8.0.190.0030.00316.84
8.0.180.0020.00516.94
8.0.170.0040.00416.80
8.0.160.0040.00417.00
8.0.150.0000.00716.81
8.0.140.0000.00716.76
8.0.130.0000.00613.32
8.0.120.0070.00016.91
8.0.110.0050.00316.77
8.0.100.0040.00416.95
8.0.90.0000.00716.77
8.0.80.0060.01116.91
8.0.70.0040.00416.83
8.0.60.0030.00516.95
8.0.50.0000.00816.75
8.0.30.0090.01117.05
8.0.20.0140.01017.40
8.0.10.0040.00416.97
8.0.00.0120.00616.69
7.4.330.0030.00315.55
7.4.320.0000.00716.46
7.4.300.0000.00716.55
7.4.290.0050.00316.64
7.4.280.0070.00016.64
7.4.270.0060.00316.58
7.4.260.0030.00316.45
7.4.250.0080.00016.55
7.4.240.0000.00716.59
7.4.230.0000.00716.27
7.4.220.0000.00816.40
7.4.210.0100.00616.51
7.4.200.0000.00716.38
7.4.160.0080.00816.51
7.4.140.0100.00717.86
7.4.130.0120.00916.31
7.4.120.0100.00916.53
7.4.110.0070.01416.55
7.4.100.0140.00316.43
7.4.90.0140.00316.63
7.4.80.0150.00619.39
7.4.70.0120.00616.55
7.4.60.0060.01616.40
7.4.50.0100.00316.34
7.4.40.0110.01116.70
7.4.00.0080.00814.87
7.3.330.0050.00013.12
7.3.320.0000.00613.16
7.3.310.0040.00416.33
7.3.300.0000.00716.11
7.3.290.0030.00316.29
7.3.280.0110.00716.33
7.3.260.0100.00816.31
7.3.240.0100.00916.43
7.3.230.0070.01016.49
7.3.210.0110.00716.43
7.3.200.0060.00916.54
7.3.190.0120.00916.55
7.3.180.0100.00716.61
7.3.170.0060.01116.24
7.3.160.0090.01216.31
7.3.120.0090.00914.89
7.3.110.0100.00714.57
7.3.100.0090.00614.73
7.3.90.0030.01014.81
7.3.80.0040.00815.02
7.3.70.0120.00314.79
7.3.60.0070.00714.73
7.3.50.0080.00314.67
7.3.40.0000.01414.48
7.3.30.0030.00914.63
7.3.20.0090.00316.33
7.3.10.0040.01316.62
7.3.00.0050.00816.46
7.2.330.0120.00616.64
7.2.320.0120.00916.84
7.2.310.0090.00716.81
7.2.300.0040.01216.50
7.2.290.0060.01616.75
7.2.250.0030.01414.88
7.2.240.0090.00915.35
7.2.230.0030.00914.99
7.2.220.0060.00915.02
7.2.210.0040.01115.10
7.2.200.0030.01214.98
7.2.190.0030.01215.05
7.2.180.0110.00415.07
7.2.170.0110.00015.07
7.2.130.0080.00617.01
7.2.120.0120.00516.68
7.2.110.0180.00016.77
7.2.100.0100.00716.89
7.2.90.0030.00717.01
7.2.80.0120.00616.89
7.2.70.0150.00915.88
7.2.60.0120.00815.85
7.2.50.0180.00916.05
7.2.40.0230.00716.08
7.2.30.0110.01115.87
7.2.20.0430.00715.76
7.2.10.0150.01215.97
7.2.00.0190.00816.04
7.1.330.0000.01415.60
7.1.320.0090.00615.60
7.1.310.0060.00315.91
7.1.300.0060.00615.64
7.1.290.0070.00715.80
7.1.280.0090.00315.52
7.1.270.0060.00315.68
7.1.260.0040.01215.74
7.1.250.0040.01115.82
7.1.200.0090.00615.82
7.1.170.0190.00913.84
7.1.160.0270.01014.10
7.1.150.0250.01213.85
7.1.140.0250.00914.11
7.1.130.0290.00913.96
7.1.120.0830.00714.03
7.1.110.0200.00613.93
7.1.100.0170.01013.99
7.1.90.0170.01013.88
7.1.80.0300.00714.05
7.1.70.0190.00714.05
7.1.60.0420.00631.82
7.1.50.0480.00631.95
7.1.40.0310.02431.85
7.1.30.0370.01131.63
7.1.20.0390.00731.91
7.1.10.0250.00413.94
7.1.00.0340.00614.08

preferences:
35.33 ms | 400 KiB | 5 Q