3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = '{ifvar[?]}<tr> <td class="padding-left20 padding-right20" style="padding: 5px 40px 0 40px; background-color: #f8f8f8;"> <span class="size24" style="display: block; font-size: 24px; color: #472786; font-weight: bold; line-height: 1;"> Enjoy our internal messaging system </span> <span class="size14" style="display: block;"> What does it give you? A Casting Professional who is looking to find talent for their projects with AllCasting.com, can initiate a conversation with our members through our easy to use Messaging System. If there\'s a casting call in your area that perfectly matches your profile, you\'ll get notified as well! </span> <span class="size14" style="display: block; padding: 10px 0 0 0;"> You have <span style="font-style: italic; color: #472786; font-weight: bold;"> ? UNREAD message{plural[{GES_UNREAD_CONVERSATIONS}]}s{/plural}</span> from agents and casting directors! </span> <span style="display: block; max-width: 210px; padding: 30px 0 0 0;" class="btnFullWidth size14"> <span class="desktop-btn" style="display: block; text-align: center; padding: 10px 18px 9px 18px; background-color: #2bb672; border-radius: 5px 5px 5px 5px;"> <a href="{GES_SINGLE_LOGIN_URL}&goto=/messages" style="display: block; text-align: center; text-decoration: none; vertical-align: middle; text-transform: uppercase;"> <span style="display: block; font-size: 14px; font-weight: bold; color: #ffffff; line-height: 1.4;">view all messages</span> </a> </span> </span> </td> </tr> <tr> <td style="padding:0;"> <span style="display: block; height: 0; padding: 10px 0 0 0;">&nbsp;</span> </td> </tr> {/ifvar}'; /* echo '<pre style="color:green">'; echo htmlentities($text); echo '</pre>'; */ echo '<pre style="color:red">'; echo htmlentities(_replaceIfVarTags($text)); echo '</pre>'; function _replaceIfVarTags($text) { // $text = iconv("UTF-8", "UTF-8//IGNORE", $text); $regexp = '/\\{!?ifvar\\[(.*?)(?=\\]})\\]\\}(([\\s\\S](?!\\{!?ifvar))*?)\\{\\/ifvar\\}/i'; preg_match_all($regexp, $text, $matches); echo '<hr><pre style="color:black">'; echo htmlentities(print_r($matches,1)); echo '</pre><hr>'; if (!$matches || !$matches[0]) return $text; foreach ($matches[0] as $k => $v) { $value = trim($matches[1][$k]); if (strpos($v, '{!ifvar') === false) { if (in_array($value, ['', '0', 0, false, 'false', null], true)) { $text = str_replace($v, '', $text); } else { $text = str_replace($v, $matches[2][$k], $text); } } else { if ($value === '') { $text = str_replace($v, $matches[2][$k], $text); } else { $text = str_replace($v, '', $text); } } } //return _replaceIfVarTags($text); }

Abusive script

This script was stopped while abusing our resources

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.110.0060.00320.94
8.3.100.0080.00316.80
8.3.90.0030.00618.62
8.3.80.0120.00018.54
8.3.70.0220.00016.75
8.3.60.0060.01018.80
8.3.50.0100.00318.61
8.3.40.0160.00018.97
8.3.30.0040.01119.22
8.3.20.0040.00422.03
8.3.10.0050.00323.61
8.3.00.0050.00323.82
8.2.230.0030.00622.58
8.2.220.0090.00324.06
8.2.210.0000.00926.77
8.2.200.0060.00317.13
8.2.190.0140.00416.75
8.2.180.0070.00717.13
8.2.170.0090.01219.17
8.2.160.0070.00722.96
8.2.150.0050.00324.18
8.2.140.0080.00024.66
8.2.130.0040.00421.25
8.2.120.0040.00426.35
8.2.110.0040.00721.16
8.2.100.0040.00718.22
8.2.90.0000.01018.41
8.2.80.0030.00518.47
8.2.70.0040.00418.15
8.2.60.0080.00018.05
8.2.50.0040.00418.47
8.2.40.0060.00319.47
8.2.30.0020.00519.44
8.2.20.0000.00718.15
8.2.10.0050.00318.11
8.2.00.0000.00818.20
8.1.290.0090.00018.88
8.1.280.0150.00025.92
8.1.270.0040.00424.09
8.1.260.0050.00326.35
8.1.250.0030.00528.09
8.1.240.0040.00424.09
8.1.230.0040.00821.04
8.1.220.0100.00017.91
8.1.210.0030.00519.00
8.1.200.0030.00617.48
8.1.190.0030.00617.60
8.1.180.0040.00418.10
8.1.170.0050.00318.91
8.1.160.0040.00418.92
8.1.150.0040.00419.05
8.1.140.0050.00317.81
8.1.130.0030.00319.05
8.1.120.0040.00417.71
8.1.110.0060.00317.75
8.1.100.0000.00817.71
8.1.90.0110.00017.53
8.1.80.0060.00317.55
8.1.70.0040.00417.71
8.1.60.0030.00517.76
8.1.50.0030.00617.77
8.1.40.0040.00417.62
8.1.30.0040.00417.85
8.1.20.0030.00617.89
8.1.10.0000.01117.83
8.1.00.0090.00017.75
8.0.300.0070.00020.02
8.0.290.0000.00816.88
8.0.280.0000.00818.46
8.0.270.0040.00417.32
8.0.260.0000.00717.37
8.0.250.0030.00317.10
8.0.240.0030.00617.27
8.0.230.0000.00717.23
8.0.220.0000.00817.14
8.0.210.0030.00317.04
8.0.200.0070.00017.18
8.0.190.0040.00417.16
8.0.180.0040.00417.05
8.0.170.0000.00917.16
8.0.160.0000.00717.25
8.0.150.0110.00017.09
8.0.140.0080.00017.08
8.0.130.0000.00613.49
8.0.120.0050.00316.93
8.0.110.0000.00817.03
8.0.100.0000.00717.02
8.0.90.0070.00017.13
8.0.80.0070.01017.07
8.0.70.0040.00417.15
8.0.60.0050.00317.03
8.0.50.0040.00417.08
8.0.30.0100.01017.08
8.0.20.0100.00917.40
8.0.10.0040.00417.13
8.0.00.0120.00717.04
7.4.330.0000.00515.55
7.4.320.0040.00416.83
7.4.300.0050.00216.73
7.4.290.0030.00316.83
7.4.280.0040.00416.92
7.4.270.0000.00716.96
7.4.260.0050.00216.84
7.4.250.0000.00716.82
7.4.240.0070.00016.83
7.4.230.0040.00416.82
7.4.220.0000.00716.72
7.4.210.0050.01116.93
7.4.200.0050.00216.90
7.4.160.0140.00416.86
7.4.140.0070.01217.86
7.4.130.0060.01816.93
7.4.120.0130.00816.81
7.4.110.0120.00616.72
7.4.100.0030.01416.91
7.4.90.0070.01016.77
7.4.80.0070.01319.39
7.4.70.0090.00916.71
7.4.60.0040.01416.68
7.4.50.0070.01116.82
7.4.40.0130.00616.79
7.4.00.0110.00715.27
7.3.330.0030.00313.37
7.3.320.0030.00313.41
7.3.310.0000.00716.55
7.3.300.0030.00316.50
7.3.290.0030.00316.41
7.3.280.0100.00716.54
7.3.260.0080.01316.78
7.3.240.0100.00916.77
7.3.230.0150.00316.95
7.3.210.0100.00716.77
7.3.200.0070.01116.48
7.3.190.0100.00716.83
7.3.180.0070.01516.64
7.3.170.0070.01016.85
7.3.160.0050.01116.56
7.2.330.0060.01216.88
7.2.320.0110.00616.91
7.2.310.0140.00316.82
7.2.300.0100.01116.90
7.2.290.0070.01116.92
7.2.60.0030.01016.93
7.2.50.0140.00717.30
7.2.40.2250.00918.25
7.2.30.2130.01118.26
7.2.20.1980.00918.25
7.2.10.2240.00918.26
7.2.00.1840.01418.41
7.1.200.0070.00716.16
7.1.160.2460.01316.93
7.1.150.2190.01116.94
7.1.140.1920.01117.19
7.1.130.2630.01417.13
7.1.120.1900.01316.98
7.1.110.1660.01116.47
7.1.100.2810.00816.62
7.1.90.2000.01216.59
7.1.80.2660.01316.34
7.1.70.3360.01115.55
7.1.60.2170.01833.70
7.1.50.2910.01133.26
7.1.40.3650.01432.88
7.1.30.0950.01433.20
7.1.20.2160.01433.10
7.1.10.4420.01215.31
7.1.00.2090.00815.30
7.0.290.2060.01016.51
7.0.270.0270.01417.02
7.0.260.0160.01516.81
7.0.250.0970.01116.07
7.0.240.0840.01416.40
7.0.230.0200.01416.04
7.0.220.0190.00916.00
7.0.210.0550.01515.08
7.0.200.0130.01715.01
7.0.190.0160.00915.20
7.0.180.1210.01114.95
7.0.170.1170.01314.86
7.0.160.1030.00614.56
7.0.150.2320.01114.70
7.0.140.0720.00914.80
7.0.130.1060.01115.00
7.0.120.0900.01215.02
7.0.110.0990.01614.79
7.0.100.1000.00714.88
7.0.90.0770.00914.92
7.0.80.0650.01214.89
7.0.70.0740.01415.04
7.0.60.1230.01114.63
7.0.50.1150.01314.78
7.0.40.1250.01414.71
7.0.30.0730.00815.06
7.0.20.0540.01215.04
7.0.10.0580.01114.65
7.0.00.0720.00914.94
5.6.300.0290.05922.12
5.6.290.0160.06022.17
5.6.280.0200.06322.32
5.6.270.0200.06222.12
5.6.260.0180.06522.17
5.6.250.0210.05722.17
5.6.240.0200.05922.22
5.6.230.0190.06522.17
5.6.220.0220.06822.21
5.6.210.0230.06222.23
5.6.200.0190.06122.23
5.6.190.0160.06222.11
5.6.180.0220.06722.10
5.6.170.0200.06222.09
5.6.160.0190.06022.21
5.6.150.0200.06822.20
5.6.140.0180.05922.10
5.6.130.0240.05922.21
5.6.120.0190.06022.18
5.6.110.0210.06522.29
5.6.100.0200.06122.19
5.6.90.0200.06422.07
5.6.80.0220.05321.46
5.6.70.0210.05321.55
5.6.60.0210.05621.51
5.6.50.0210.06121.49
5.6.40.0180.05521.57
5.6.30.0200.06021.57
5.6.20.0160.06621.46
5.6.10.0160.05521.52
5.6.00.0170.05921.63
5.5.380.0170.05918.98
5.5.370.0240.06518.80
5.5.360.0230.06118.76
5.5.350.0190.07418.97
5.5.340.0240.05519.45
5.5.330.0160.06619.46
5.5.320.0160.05719.33
5.5.310.0180.05719.37
5.5.300.0190.05519.45
5.5.290.0170.05719.35
5.5.280.0150.06519.27
5.5.270.0190.06419.09
5.5.260.0170.05919.05
5.5.250.0150.06718.84
5.5.240.0190.05118.73
5.5.230.0190.05518.66
5.5.220.0150.05918.81
5.5.210.0200.05118.73
5.5.200.0150.06918.63
5.5.190.0150.06218.62
5.5.180.0130.06018.71
5.5.160.0130.05918.71
5.5.150.0130.05918.62
5.5.140.0170.05418.64
5.5.130.0160.05218.63
5.5.120.0150.05918.41
5.5.110.0200.05018.79
5.5.100.0130.05618.70
5.5.90.0150.06518.51
5.5.80.0120.05518.63
5.5.70.0160.05618.62
5.5.60.0170.05218.38
5.5.50.0180.05718.36
5.5.40.0120.05618.37
5.5.30.0150.05118.36
5.5.20.0160.05418.30
5.5.10.0170.05618.61
5.5.00.0190.05818.60
5.4.450.0270.07620.64
5.4.440.0210.07120.57
5.4.430.0200.05920.70
5.4.420.0150.05620.66
5.4.410.0170.05720.59
5.4.400.0200.05020.25
5.4.390.0110.05920.07
5.4.380.0210.06920.20
5.4.370.0170.05020.38
5.4.360.0180.07420.32
5.4.350.0150.06320.07
5.4.340.0190.05120.32
5.4.320.0160.05820.16
5.4.310.0180.05220.30
5.4.300.0190.05020.23
5.4.290.0110.05920.22
5.4.280.0170.06220.27
5.4.270.0150.05320.35
5.4.260.0140.05220.33
5.4.250.0200.05120.35
5.4.240.0190.05220.37
5.4.230.0210.05120.37
5.4.220.0230.07520.08
5.4.210.0150.05220.29
5.4.200.0170.05020.47
5.4.190.0230.04720.31
5.4.180.0140.05320.24
5.4.170.0270.06620.14
5.4.160.0130.05720.26
5.4.150.0250.06620.14
5.4.140.0180.05917.93
5.4.130.0160.04717.85
5.4.120.0200.06917.74
5.4.110.0220.05617.88
5.4.100.0190.04617.97
5.4.90.0140.07417.92
5.4.80.0190.06417.57
5.4.70.0160.05417.73
5.4.60.0180.06917.77
5.4.50.0150.06317.70
5.4.40.0160.05117.82
5.4.30.0140.05017.72
5.4.20.0180.06817.70
5.4.10.0250.05717.74
5.4.00.0090.05517.27
5.3.290.0150.05014.96
5.3.280.0160.05014.63
5.3.270.0110.05914.66
5.3.260.0150.05514.90
5.3.250.0140.05214.60
5.3.240.0140.05114.73
5.3.230.0150.07214.73
5.3.220.0140.07414.84
5.3.210.0170.05014.76
5.3.200.0200.04814.84
5.3.190.0140.05314.77
5.3.180.0150.06714.87
5.3.170.0190.06614.83
5.3.160.0160.05014.69
5.3.150.0180.05214.84
5.3.140.0140.05714.63
5.3.130.0110.05914.82
5.3.120.0130.05714.60
5.3.110.0140.05414.78
5.3.100.0240.05714.31
5.3.90.0180.06514.08
5.3.80.0150.05514.29
5.3.70.0180.04514.31
5.3.60.0190.06714.05
5.3.50.0110.06914.15
5.3.40.0130.05214.24
5.3.30.0150.05514.13
5.3.20.0140.04713.94
5.3.10.0160.04413.83
5.3.00.0120.05913.53
5.2.170.0130.04411.38
5.2.160.0140.03911.43
5.2.150.0060.04511.32
5.2.140.0110.04311.41
5.2.130.0130.03711.16
5.2.120.0110.04111.39
5.2.110.0130.03811.10
5.2.100.0170.05311.15
5.2.90.0120.05811.41
5.2.80.0130.04611.31
5.2.70.0140.04711.09
5.2.60.0110.04111.24
5.2.50.0130.03811.08
5.2.40.0150.04211.18
5.2.30.0100.04111.17
5.2.20.0150.03711.08
5.2.10.0080.03911.09
5.2.00.0120.03710.98
5.1.60.0080.03410.30
5.1.50.0080.03710.34
5.1.40.0120.0439.97
5.1.30.0070.04110.57
5.1.20.0160.03410.54
5.1.10.0170.0359.96
5.1.00.0130.03610.18
5.0.50.0080.0298.87
5.0.40.0100.0358.68
5.0.30.0080.0458.48
5.0.20.0070.0278.48
5.0.10.0100.0288.48
5.0.00.0070.0428.48
4.4.90.0050.0238.48
4.4.80.0110.0178.48
4.4.70.0080.0208.48
4.4.60.0070.0218.48
4.4.50.0060.0208.48
4.4.40.0130.0398.48
4.4.30.0080.0208.48
4.4.20.0040.0248.48
4.4.10.0070.0218.48
4.4.00.0070.0338.48
4.3.110.0070.0308.48
4.3.100.0050.0218.48
4.3.90.0050.0218.48
4.3.80.0020.0368.48
4.3.70.0070.0208.48
4.3.60.0040.0228.48
4.3.50.0060.0268.48
4.3.40.0060.0338.48
4.3.30.0080.0208.48
4.3.20.0040.0218.48
4.3.10.0020.0228.48
4.3.00.0030.0238.48

preferences:
126.61 ms | 4388 KiB | 5 Q