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.70.0040.01218.43
8.3.60.0120.00618.30
8.3.50.0070.00718.16
8.3.40.0160.00018.54
8.3.30.0110.00418.71
8.3.20.0070.00018.85
8.3.10.0050.00321.90
8.3.00.0050.00323.65
8.2.190.0070.00716.58
8.2.180.0090.00618.42
8.2.170.0110.00422.96
8.2.160.0090.00618.94
8.2.150.0040.00425.66
8.2.140.0050.00324.66
8.2.130.0000.00718.16
8.2.120.0020.00526.35
8.2.110.0100.00022.27
8.2.100.0080.00417.91
8.2.90.0030.00619.16
8.2.80.0090.00017.97
8.2.70.0040.00417.93
8.2.60.0060.00317.93
8.2.50.0040.00418.10
8.2.40.0040.00419.43
8.2.30.0040.00419.29
8.2.20.0050.00518.23
8.2.10.0080.00019.36
8.2.00.0040.00419.43
8.1.280.0060.00925.92
8.1.270.0040.00422.08
8.1.260.0050.00226.35
8.1.250.0030.00528.09
8.1.240.0030.00622.04
8.1.230.0040.00718.99
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0030.00617.35
8.1.190.0060.00317.22
8.1.180.0080.00018.10
8.1.170.0000.00818.80
8.1.160.0000.00918.86
8.1.150.0040.00418.94
8.1.140.0040.00419.47
8.1.130.0030.00318.95
8.1.120.0060.00317.50
8.1.110.0070.00017.46
8.1.100.0030.00417.50
8.1.90.0050.00317.48
8.1.80.0050.00317.45
8.1.70.0030.00317.35
8.1.60.0080.00817.59
8.1.50.0040.00417.51
8.1.40.0030.00617.35
8.1.30.0000.00717.70
8.1.20.0030.00617.49
8.1.10.0040.00417.61
8.1.00.0040.00417.42
8.0.300.0070.00018.77
8.0.290.0040.00416.63
8.0.280.0030.00318.52
8.0.270.0000.00717.21
8.0.260.0060.00017.26
8.0.250.0000.00816.93
8.0.240.0030.00316.85
8.0.230.0000.00716.92
8.0.220.0030.00316.80
8.0.210.0040.00416.83
8.0.200.0030.00516.88
8.0.190.0070.00016.93
8.0.180.0040.00416.93
8.0.170.0030.00616.87
8.0.160.0000.00716.92
8.0.150.0050.00216.72
8.0.140.0000.00716.83
8.0.130.0030.00313.33
8.0.120.0070.00016.82
8.0.110.0050.00316.76
8.0.100.0040.00416.76
8.0.90.0040.00416.72
8.0.80.0080.00816.86
8.0.70.0040.00416.90
8.0.60.0040.00416.87
8.0.50.0030.00316.74
8.0.30.0100.01017.20
8.0.20.0090.00817.40
8.0.10.0070.00017.05
8.0.00.0100.00716.64
7.4.330.0030.00315.55
7.4.320.0070.00016.46
7.4.300.0000.00716.48
7.4.290.0000.00716.64
7.4.280.0040.00416.50
7.4.270.0120.00016.58
7.4.260.0000.00716.39
7.4.250.0030.00316.37
7.4.240.0000.00716.43
7.4.230.0040.00416.48
7.4.220.0040.00416.63
7.4.210.0070.00916.61
7.4.200.0030.00316.62
7.4.160.0110.00616.58
7.4.140.0090.00817.86
7.4.130.0180.00716.41
7.4.120.0120.00616.52
7.4.110.0120.00616.62
7.4.100.0130.00716.55
7.4.90.0070.01616.52
7.4.80.0100.01319.39
7.4.70.0070.01016.60
7.4.60.0090.01516.46
7.4.50.0090.00316.46
7.4.40.0150.00616.67
7.4.00.0100.00615.00
7.3.330.0000.00513.29
7.3.320.0060.00013.11
7.3.310.0070.00016.32
7.3.300.0060.00016.21
7.3.290.0000.00716.20
7.3.280.0080.00716.28
7.3.260.0090.00916.47
7.3.240.0120.00916.49
7.3.230.0130.01016.46
7.3.210.0050.01316.31
7.3.200.0110.00616.41
7.3.190.0190.00316.32
7.3.180.0060.00916.13
7.3.170.0000.01616.31
7.3.160.0100.01316.36
7.3.10.0030.01016.58
7.3.00.0070.00716.66
7.2.330.0090.00916.68
7.2.320.0150.00616.89
7.2.310.0040.01816.67
7.2.300.0080.00816.82
7.2.290.0070.01416.46
7.2.130.0030.01016.85
7.2.120.0080.00416.82
7.2.110.0090.00516.65
7.2.100.0040.01217.12
7.2.90.0060.00617.00
7.2.80.0030.01016.98
7.2.70.0190.00915.97
7.2.60.0150.01215.88
7.2.50.0230.00316.01
7.2.40.0150.00715.91
7.2.30.0160.00615.97
7.2.20.0170.00615.71
7.2.10.0170.01115.99
7.2.00.0180.00316.02
7.1.250.0060.00315.84
7.1.200.0090.00615.81
7.1.170.0360.00313.95
7.1.160.0190.01013.88
7.1.150.0240.00613.84
7.1.140.0540.01414.05
7.1.130.0240.00714.04
7.1.120.0280.00613.71
7.1.110.1330.00013.94
7.1.100.0280.01213.86
7.1.90.0350.01013.89
7.1.80.0330.01213.83
7.1.70.0170.01413.88
7.1.60.0440.02031.95
7.1.50.0600.01332.09
7.1.40.0720.00332.03
7.1.30.0540.01031.95
7.1.20.0420.00931.94
7.1.10.0270.00714.09
7.1.00.0350.01013.97

preferences:
63.53 ms | 401 KiB | 5 Q