3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class abc { function abc() { $this->abc = 'Hello'; } function bcd() { $bcd = ' World'; return $this->abc . $bcd; } } $abc = new abc(); echo $abc->bcd(); $bcd = range( 1, 100 ); foreach( $bcd as $def ) { $efg = $def; } function better_array_diff($a, $b) { $map = array(); foreach($a as $val) $map[$val] = 1; foreach($b as $val) if(isset($map[$val])) unset($map[$val]); return $map; } $a = range(1, 10000); $b = range(5000, 15000); shuffle($a); shuffle($b); $ts = microtime(true); array_diff($a, $b); printf("array_diff=%.4f\n", microtime(true) - $ts); $ts = microtime(true); better_array_diff($a, $b); printf("better_array_diff=%.4f\n", microtime(true) - $ts);
Output for 7.1.0
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; abc has a deprecated constructor in /in/JYXtF on line 2 Hello Worldarray_diff=0.0019 better_array_diff=0.0009
Output for 7.0.14
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; abc has a deprecated constructor in /in/JYXtF on line 2 Hello Worldarray_diff=0.0019 better_array_diff=0.0010
Output for 7.0.10
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; abc has a deprecated constructor in /in/JYXtF on line 2 Hello Worldarray_diff=0.0015 better_array_diff=0.0009
Output for 7.0.6, 7.0.9
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; abc has a deprecated constructor in /in/JYXtF on line 2 Hello Worldarray_diff=0.0020 better_array_diff=0.0010
Output for 7.0.8
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; abc has a deprecated constructor in /in/JYXtF on line 2 Hello Worldarray_diff=0.0203 better_array_diff=0.0010
Output for 7.0.7
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; abc has a deprecated constructor in /in/JYXtF on line 2 Hello Worldarray_diff=0.0175 better_array_diff=0.0009
Output for 7.0.5
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; abc has a deprecated constructor in /in/JYXtF on line 2 Hello Worldarray_diff=0.0018 better_array_diff=0.0009
Output for 7.0.4
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; abc has a deprecated constructor in /in/JYXtF on line 2 Hello Worldarray_diff=0.0013 better_array_diff=0.0006
Output for 7.0.3
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; abc has a deprecated constructor in /in/JYXtF on line 2 Hello Worldarray_diff=0.0014 better_array_diff=0.0009
Output for 7.0.0, 7.0.2
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; abc has a deprecated constructor in /in/JYXtF on line 2 Hello Worldarray_diff=0.0012 better_array_diff=0.0006
Output for 7.0.1
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; abc has a deprecated constructor in /in/JYXtF on line 2 Hello Worldarray_diff=0.0015 better_array_diff=0.0007
Output for hhvm-3.12.0
Hello Worldarray_diff=0.0038 better_array_diff=0.0039
Output for hhvm-3.10.0
Hello Worldarray_diff=0.0033 better_array_diff=0.0028
Output for 5.6.28
Hello Worldarray_diff=0.0687 better_array_diff=0.0047
Output for 5.6.25
Hello Worldarray_diff=0.0517 better_array_diff=0.0081
Output for 5.6.24
Hello Worldarray_diff=0.0600 better_array_diff=0.0043
Output for 5.6.23
Hello Worldarray_diff=0.0678 better_array_diff=0.0095
Output for 5.6.22
Hello Worldarray_diff=0.0571 better_array_diff=0.0079
Output for 5.6.21
Hello Worldarray_diff=0.0620 better_array_diff=0.0076
Output for 5.6.20
Hello Worldarray_diff=0.0499 better_array_diff=0.0036
Output for 5.6.19
Hello Worldarray_diff=0.0569 better_array_diff=0.0085
Output for 5.6.18
Hello Worldarray_diff=0.0475 better_array_diff=0.0044
Output for 5.6.17
Hello Worldarray_diff=0.0500 better_array_diff=0.0066
Output for 5.6.16
Hello Worldarray_diff=0.0592 better_array_diff=0.0065
Output for 5.6.15
Hello Worldarray_diff=0.0464 better_array_diff=0.0034
Output for 5.6.14
Hello Worldarray_diff=0.0554 better_array_diff=0.0043
Output for 5.6.13
Hello Worldarray_diff=0.0453 better_array_diff=0.0053
Output for 5.6.12
Hello Worldarray_diff=0.0544 better_array_diff=0.0061
Output for 5.6.11
Hello Worldarray_diff=0.0492 better_array_diff=0.0042
Output for 5.6.10
Hello Worldarray_diff=0.0456 better_array_diff=0.0084
Output for 5.6.9
Hello Worldarray_diff=0.0506 better_array_diff=0.0038
Output for 5.6.8
Hello Worldarray_diff=0.0519 better_array_diff=0.0040
Output for 5.6.7
Hello Worldarray_diff=0.0499 better_array_diff=0.0052
Output for 5.6.6
Hello Worldarray_diff=0.0533 better_array_diff=0.0068
Output for 5.6.5
Hello Worldarray_diff=0.0464 better_array_diff=0.0038
Output for 5.6.4
Hello Worldarray_diff=0.0518 better_array_diff=0.0048
Output for 5.6.3
Hello Worldarray_diff=0.0433 better_array_diff=0.0037
Output for 5.6.2
Hello Worldarray_diff=0.0689 better_array_diff=0.0071
Output for 5.6.1
Hello Worldarray_diff=0.0590 better_array_diff=0.0041
Output for 5.6.0
Hello Worldarray_diff=0.0645 better_array_diff=0.0063
Output for 5.5.38
Hello Worldarray_diff=0.0548 better_array_diff=0.0045
Output for 5.5.37
Hello Worldarray_diff=0.0677 better_array_diff=0.0060
Output for 5.5.36
Hello Worldarray_diff=0.0584 better_array_diff=0.0043
Output for 5.5.35
Hello Worldarray_diff=0.0628 better_array_diff=0.0076
Output for 5.5.34
Hello Worldarray_diff=0.0645 better_array_diff=0.0058
Output for 5.5.33
Hello Worldarray_diff=0.0744 better_array_diff=0.0058
Output for 5.5.32
Hello Worldarray_diff=0.0700 better_array_diff=0.0076
Output for 5.5.31
Hello Worldarray_diff=0.0397 better_array_diff=0.0032
Output for 5.5.30
Hello Worldarray_diff=0.0640 better_array_diff=0.0049
Output for 5.5.29
Hello Worldarray_diff=0.0566 better_array_diff=0.0071
Output for 5.5.28
Hello Worldarray_diff=0.0542 better_array_diff=0.0037
Output for 5.5.27
Hello Worldarray_diff=0.0607 better_array_diff=0.0055
Output for 5.5.26
Hello Worldarray_diff=0.0573 better_array_diff=0.0077
Output for 5.5.25
Hello Worldarray_diff=0.0606 better_array_diff=0.0071
Output for 5.5.24
Hello Worldarray_diff=0.0595 better_array_diff=0.0063
Output for 5.5.23
Hello Worldarray_diff=0.0460 better_array_diff=0.0041
Output for 5.5.22
Hello Worldarray_diff=0.0522 better_array_diff=0.0063
Output for 5.5.21
Hello Worldarray_diff=0.0586 better_array_diff=0.0068
Output for 5.5.20
Hello Worldarray_diff=0.0724 better_array_diff=0.0054
Output for 5.5.19
Hello Worldarray_diff=0.0602 better_array_diff=0.0050
Output for 5.5.18
Hello Worldarray_diff=0.0482 better_array_diff=0.0037
Output for 5.5.16
Hello Worldarray_diff=0.0477 better_array_diff=0.0051
Output for 5.5.15
Hello Worldarray_diff=0.0583 better_array_diff=0.0049
Output for 5.5.14
Hello Worldarray_diff=0.0604 better_array_diff=0.0048
Output for 5.5.13
Hello Worldarray_diff=0.0586 better_array_diff=0.0046
Output for 5.5.12
Hello Worldarray_diff=0.0691 better_array_diff=0.0051
Output for 5.5.11
Hello Worldarray_diff=0.0799 better_array_diff=0.0053
Output for 5.5.10
Hello Worldarray_diff=0.0695 better_array_diff=0.0054
Output for 5.5.9
Hello Worldarray_diff=0.0673 better_array_diff=0.0049
Output for 5.5.8
Hello Worldarray_diff=0.0576 better_array_diff=0.0047
Output for 5.5.7
Hello Worldarray_diff=0.0548 better_array_diff=0.0079
Output for 5.5.6
Hello Worldarray_diff=0.0578 better_array_diff=0.0043
Output for 5.5.5
Hello Worldarray_diff=0.0597 better_array_diff=0.0047
Output for 5.5.4
Hello Worldarray_diff=0.0640 better_array_diff=0.0080
Output for 5.5.3
Hello Worldarray_diff=0.0517 better_array_diff=0.0047
Output for 5.5.2
Hello Worldarray_diff=0.0430 better_array_diff=0.0041
Output for 5.5.1
Hello Worldarray_diff=0.0559 better_array_diff=0.0048
Output for 5.5.0
Hello Worldarray_diff=0.0611 better_array_diff=0.0086
Output for 5.4.45
Hello Worldarray_diff=0.0563 better_array_diff=0.0073
Output for 5.4.44
Hello Worldarray_diff=0.0542 better_array_diff=0.0062
Output for 5.4.43
Hello Worldarray_diff=0.0617 better_array_diff=0.0083
Output for 5.4.42
Hello Worldarray_diff=0.0497 better_array_diff=0.0036
Output for 5.4.41
Hello Worldarray_diff=0.0504 better_array_diff=0.0068
Output for 5.4.40
Hello Worldarray_diff=0.0516 better_array_diff=0.0043
Output for 5.4.39
Hello Worldarray_diff=0.0332 better_array_diff=0.0038
Output for 5.4.38
Hello Worldarray_diff=0.0552 better_array_diff=0.0076
Output for 5.4.37
Hello Worldarray_diff=0.0483 better_array_diff=0.0072
Output for 5.4.36
Hello Worldarray_diff=0.0311 better_array_diff=0.0031
Output for 5.4.35
Hello Worldarray_diff=0.0842 better_array_diff=0.0087
Output for 5.4.34
Hello Worldarray_diff=0.0567 better_array_diff=0.0041
Output for 5.4.32
Hello Worldarray_diff=0.0553 better_array_diff=0.0049
Output for 5.4.31
Hello Worldarray_diff=0.0657 better_array_diff=0.0066
Output for 5.4.30
Hello Worldarray_diff=0.0521 better_array_diff=0.0045
Output for 5.4.29
Hello Worldarray_diff=0.0604 better_array_diff=0.0054
Output for 5.4.28
Hello Worldarray_diff=0.0546 better_array_diff=0.0043
Output for 5.4.27
Hello Worldarray_diff=0.0628 better_array_diff=0.0062
Output for 5.4.26
Hello Worldarray_diff=0.0847 better_array_diff=0.0076
Output for 5.4.25
Hello Worldarray_diff=0.0547 better_array_diff=0.0071
Output for 5.4.24
Hello Worldarray_diff=0.0611 better_array_diff=0.0084
Output for 5.4.23
Hello Worldarray_diff=0.0527 better_array_diff=0.0074
Output for 5.4.22
Hello Worldarray_diff=0.0522 better_array_diff=0.0079
Output for 5.4.21
Hello Worldarray_diff=0.0650 better_array_diff=0.0044
Output for 5.4.20
Hello Worldarray_diff=0.0624 better_array_diff=0.0093
Output for 5.4.19
Hello Worldarray_diff=0.0571 better_array_diff=0.0062
Output for 5.4.18
Hello Worldarray_diff=0.0665 better_array_diff=0.0052
Output for 5.4.17
Hello Worldarray_diff=0.0762 better_array_diff=0.0053
Output for 5.4.16
Hello Worldarray_diff=0.0573 better_array_diff=0.0047
Output for 5.4.15
Hello Worldarray_diff=0.0634 better_array_diff=0.0073
Output for 5.4.14
Hello Worldarray_diff=0.0595 better_array_diff=0.0055
Output for 5.4.13
Hello Worldarray_diff=0.0654 better_array_diff=0.0054
Output for 5.4.12
Hello Worldarray_diff=0.0602 better_array_diff=0.0047
Output for 5.4.11
Hello Worldarray_diff=0.0637 better_array_diff=0.0074
Output for 5.4.10
Hello Worldarray_diff=0.0642 better_array_diff=0.0046
Output for 5.4.9
Hello Worldarray_diff=0.0633 better_array_diff=0.0042
Output for 5.4.8
Hello Worldarray_diff=0.0657 better_array_diff=0.0080
Output for 5.4.7
Hello Worldarray_diff=0.0666 better_array_diff=0.0087
Output for 5.4.6
Hello Worldarray_diff=0.0664 better_array_diff=0.0054
Output for 5.4.5
Hello Worldarray_diff=0.0485 better_array_diff=0.0046
Output for 5.4.4
Hello Worldarray_diff=0.0582 better_array_diff=0.0046
Output for 5.4.3
Hello Worldarray_diff=0.0544 better_array_diff=0.0079
Output for 5.4.2
Hello Worldarray_diff=0.0881 better_array_diff=0.0080
Output for 5.4.1
Hello Worldarray_diff=0.0602 better_array_diff=0.0065
Output for 5.4.0
Hello Worldarray_diff=0.0648 better_array_diff=0.0074
Output for 5.3.29
Hello Worldarray_diff=0.0751 better_array_diff=0.0053
Output for 5.3.28
Hello Worldarray_diff=0.0615 better_array_diff=0.0088
Output for 5.3.27
Hello Worldarray_diff=0.0491 better_array_diff=0.0064
Output for 5.3.26
Hello Worldarray_diff=0.0542 better_array_diff=0.0072
Output for 5.3.25
Hello Worldarray_diff=0.0564 better_array_diff=0.0067
Output for 5.3.24
Hello Worldarray_diff=0.0667 better_array_diff=0.0064
Output for 5.3.23
Hello Worldarray_diff=0.0636 better_array_diff=0.0078
Output for 5.3.22
Hello Worldarray_diff=0.0750 better_array_diff=0.0055
Output for 5.3.21
Hello Worldarray_diff=0.0621 better_array_diff=0.0059
Output for 5.3.20
Hello Worldarray_diff=0.0508 better_array_diff=0.0111
Output for 5.3.19
Hello Worldarray_diff=0.0659 better_array_diff=0.0071
Output for 5.3.18
Hello Worldarray_diff=0.0678 better_array_diff=0.0041
Output for 5.3.17
Hello Worldarray_diff=0.0641 better_array_diff=0.0085
Output for 5.3.16
Hello Worldarray_diff=0.0660 better_array_diff=0.0049
Output for 5.3.15
Hello Worldarray_diff=0.0615 better_array_diff=0.0080
Output for 5.3.14
Hello Worldarray_diff=0.0508 better_array_diff=0.0042
Output for 5.3.13
Hello Worldarray_diff=0.0784 better_array_diff=0.0054
Output for 5.3.12
Hello Worldarray_diff=0.0829 better_array_diff=0.0089
Output for 5.3.11
Hello Worldarray_diff=0.0697 better_array_diff=0.0049
Output for 5.3.10
Hello Worldarray_diff=0.0712 better_array_diff=0.0050
Output for 5.3.9
Hello Worldarray_diff=0.0740 better_array_diff=0.0056
Output for 5.3.8
Hello Worldarray_diff=0.0664 better_array_diff=0.0050
Output for 5.3.7
Hello Worldarray_diff=0.0565 better_array_diff=0.0043
Output for 5.3.6
Hello Worldarray_diff=0.0614 better_array_diff=0.0042
Output for 5.3.5
Hello Worldarray_diff=0.0544 better_array_diff=0.0073
Output for 5.3.4
Hello Worldarray_diff=0.0729 better_array_diff=0.0075
Output for 5.2.6 - 5.2.14, 5.3.0 - 5.3.3
Hello World
Process exited with code 137.
Output for 5.2.17
Hello Worldarray_diff=0.0570 better_array_diff=0.0089
Output for 5.2.16
Hello Worldarray_diff=0.0670 better_array_diff=0.0055
Output for 5.2.15
Hello Worldarray_diff=0.0642 better_array_diff=0.0090
Output for 5.2.5
Hello Worldarray_diff=0.0533 better_array_diff=0.0048
Output for 5.2.4
Hello Worldarray_diff=0.0507 better_array_diff=0.0089
Output for 5.2.3
Hello Worldarray_diff=0.0517 better_array_diff=0.0067
Output for 5.2.2
Hello Worldarray_diff=0.0548 better_array_diff=0.0048
Output for 5.2.1
Hello Worldarray_diff=0.0848 better_array_diff=0.0030
Output for 5.2.0
Hello Worldarray_diff=0.0875 better_array_diff=0.0112
Output for 5.1.6
Hello Worldarray_diff=0.0802 better_array_diff=0.0107
Output for 5.1.5
Hello Worldarray_diff=0.0906 better_array_diff=0.0099
Output for 5.1.4
Hello Worldarray_diff=0.0878 better_array_diff=0.0110
Output for 5.1.3
Hello Worldarray_diff=0.0743 better_array_diff=0.0058
Output for 5.1.2
Hello Worldarray_diff=0.0918 better_array_diff=0.0062
Output for 5.1.1
Hello Worldarray_diff=0.0888 better_array_diff=0.0067
Output for 5.1.0
Hello Worldarray_diff=0.0730 better_array_diff=0.0146
Output for 5.0.5
Hello Worldarray_diff=0.0844 better_array_diff=0.0151
Output for 5.0.4
Hello Worldarray_diff=0.0815 better_array_diff=0.0151
Output for 5.0.3
Hello Worldarray_diff=0.1107 better_array_diff=0.0149
Output for 5.0.2
Hello Worldarray_diff=0.0892 better_array_diff=0.0092
Output for 5.0.1
Hello Worldarray_diff=0.0939 better_array_diff=0.0099
Output for 5.0.0
Hello Worldarray_diff=0.1120 better_array_diff=0.0118
Output for 4.4.9
Hello Worldarray_diff=0.1259 better_array_diff=0.0101
Output for 4.4.8
Hello Worldarray_diff=0.0691 better_array_diff=0.0069
Output for 4.4.7
Hello Worldarray_diff=0.0879 better_array_diff=0.0097
Output for 4.4.6
Hello Worldarray_diff=0.0883 better_array_diff=0.0114
Output for 4.4.5
Hello Worldarray_diff=0.0820 better_array_diff=0.0067
Output for 4.4.4
Hello Worldarray_diff=0.0860 better_array_diff=0.0097
Output for 4.4.3
Hello Worldarray_diff=0.0773 better_array_diff=0.0078
Output for 4.4.2
Hello Worldarray_diff=0.0855 better_array_diff=0.0125
Output for 4.4.1
Hello Worldarray_diff=0.0928 better_array_diff=0.0081
Output for 4.4.0
Hello Worldarray_diff=0.0815 better_array_diff=0.0082
Output for 4.3.11
Hello Worldarray_diff=0.1010 better_array_diff=0.0092
Output for 4.3.10
Hello Worldarray_diff=0.1030 better_array_diff=0.0080
Output for 4.3.9
Hello Worldarray_diff=0.0910 better_array_diff=0.0096
Output for 4.3.8
Hello Worldarray_diff=0.0908 better_array_diff=0.0096
Output for 4.3.7
Hello Worldarray_diff=0.1104 better_array_diff=0.0104
Output for 4.3.6
Hello Worldarray_diff=0.1129 better_array_diff=0.0110
Output for 4.3.5
Hello Worldarray_diff=0.1126 better_array_diff=0.0169
Output for 4.3.4
Hello Worldarray_diff=0.1196 better_array_diff=0.0114
Output for 4.3.3
Hello Worldarray_diff=0.1189 better_array_diff=0.0115
Output for 4.3.2
Hello Worldarray_diff=0.1186 better_array_diff=0.0128
Output for 4.3.1
Hello Worldarray_diff=0.0866 better_array_diff=0.0100
Output for 4.3.0
Hello Worldarray_diff=0.1138 better_array_diff=0.0130